Skip to content

Commit 4a5f744

Browse files
committed
feat: v0.5.0
1 parent 0314441 commit 4a5f744

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nerdctl",
3-
"version": "0.4.4",
3+
"version": "0.5.0",
44
"main": "dist/index.js",
55
"types": "dist/index.d.ts",
66
"description": "Node wrapper for nerdctl",

src/vms/lima.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,8 @@ export default class LimaBackend extends BaseBackend {
111111
} else {
112112
await this.downloadVM();
113113

114-
const resourcesDir = path.join(this.resourcePath, platform);
115-
const tarPath = path.join(resourcesDir, `lima-${LIMA_VERSION}.tgz`);
116-
const limaDir = path.join(resourcesDir, "lima");
114+
const tarPath = path.join(this.resourcePath, `vm-${LIMA_VERSION}.tgz`);
115+
const limaDir = path.join(this.resourcePath, "vm");
117116

118117
await fs.promises.mkdir(limaDir, { recursive: true });
119118

@@ -191,9 +190,7 @@ export default class LimaBackend extends BaseBackend {
191190
const archName = isM1 ? "-aarch64" : "";
192191

193192
const url = `${LIMA_REPO}/${LIMA_VERSION}/lima-and-qemu.${platformName}${archName}.tar.gz`;
194-
const resourcesDir = path.join(this.resourcePath, platform);
195-
196-
const tarPath = path.join(resourcesDir, `lima-${LIMA_VERSION}.tgz`);
193+
const tarPath = path.join(this.resourcePath, `vm-${LIMA_VERSION}.tgz`);
197194

198195
this.emit(events.VM_INIT_OUTPUT, `Downloading virtual machine`);
199196

@@ -206,8 +203,7 @@ export default class LimaBackend extends BaseBackend {
206203
const arch = getVMArch();
207204
const archName = arch === "x86_64" ? "amd64" : "arm64";
208205

209-
const resourcesDir = path.join(this.resourcePath, platform);
210-
const location = path.join(resourcesDir, "vm.img");
206+
const location = path.join(this.resourcePath, "vm.img");
211207

212208
this.emit(events.VM_INIT_OUTPUT, `Downloading virtual machine image`);
213209

@@ -224,15 +220,15 @@ export default class LimaBackend extends BaseBackend {
224220
}
225221

226222
protected get limactl() {
227-
return path.join(this.resourcePath, platform, "lima", "bin", "limactl");
223+
return path.join(this.resourcePath, "vm", "bin", "limactl");
228224
}
229225

230226
protected get limaHome() {
231227
return path.join(this.resourcePath, "home");
232228
}
233229

234230
protected get limaEnv() {
235-
const binDir = path.join(this.resourcePath, platform, "lima", "bin");
231+
const binDir = path.join(this.resourcePath, "vm", "bin");
236232
const pathList = (process.env.PATH || "").split(path.delimiter);
237233
const newPath = [binDir].concat(...pathList).filter((x) => x);
238234
return {

0 commit comments

Comments
 (0)