Skip to content

Commit 54ad7d8

Browse files
chore: fix eraseDevice required templateId
1 parent 939f046 commit 54ad7d8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/commands/index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ class Commands {
121121
await this.commands.upload({ fsPath: templatePath }, device, "/");
122122
} else {
123123
progress.report({ message: "Erasing device... Creating root dir" });
124-
await device.adapter.mkdir(device.config.rootPath);
124+
try {
125+
await device.adapter.mkdir(device.config.rootPath);
126+
} catch (err) {
127+
if (!err.message.match(/OSError: \[Errno 17\] EEXIST/)) throw err;
128+
}
125129
}
126130

127131
resolve();

0 commit comments

Comments
 (0)