Skip to content

Commit 64aa1e0

Browse files
committed
added error message to pull
fixed getting version causing error
1 parent cfd1447 commit 64aa1e0

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

lib/hsm.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,12 @@ for (let arg of process.argv.slice(2)) {
210210
if (script) {
211211
const srcPath = commands[2] || "."
212212
const hackmudPath = config.hackmudPath
213-
pull(srcPath, hackmudPath, script)
213+
214+
try {
215+
await pull(srcPath, hackmudPath, script)
216+
} catch (error) {
217+
console.log("something went wrong, did you forget to #down the script?")
218+
}
214219
} else
215220
help()
216221
} else
@@ -305,7 +310,7 @@ function help() {
305310
}
306311

307312
async function version() {
308-
console.log(JSON.parse(await readFile(resolvePath(__dirname, "package.json"), { encoding: "utf-8" })).version || "unknown")
313+
console.log(JSON.parse(await readFile(resolvePath(__dirname, "../package.json"), { encoding: "utf-8" })).version || "unknown")
309314
}
310315

311316
async function getConfig() {

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)