We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 832df69 commit c738936Copy full SHA for c738936
src/vms/lima.ts
@@ -1,13 +1,15 @@
1
import BaseBackend from "./base";
2
import { ChildProcess } from "child_process";
3
import { LimaListResult } from "@/types/lima";
4
+import { isM1 } from "@/utils";
5
import { which } from "shelljs";
6
7
export default class LimaBackend extends BaseBackend {
8
async initVM(): Promise<boolean> {
9
if (!which("brew")) return false;
10
if (!which(this.vm)) {
- const child = (await this.exec(`brew install lima`)) as ChildProcess;
11
+ const command = `${isM1 ? `arch -arm64 ` : ""}brew install lima`;
12
+ const child = (await this.exec(command)) as ChildProcess;
13
await new Promise((resolve, reject) => {
14
child?.stdout?.on("data", (data) => {
15
console.log(data);
0 commit comments