Skip to content

Commit cbe1d55

Browse files
committed
fix (ci): made error handling more explicit when gitcraft bin for the platform is not found && bumped Cargo toml version(0.1.1)
Signed-off-by: rafaeljohn9 <[email protected]>
1 parent 81dba05 commit cbe1d55

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.github/workflows/publish-npm.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,13 @@ jobs:
123123
const binPath = path.join(path.dirname(pkgPath), 'bin', binName);
124124
child_process.execFileSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
125125
} catch (e) {
126-
console.error(`Missing platform package: ${pkg}`);
127-
console.error(`Run: npm install -g ${pkg}`);
128-
process.exit(1);
126+
if (e.code === 'MODULE_NOT_FOUND') {
127+
console.error(`Missing platform package: ${pkg}`);
128+
console.error(`Run: npm install -g ${pkg}`);
129+
process.exit(1);
130+
} else {
131+
throw e;
132+
}
129133
}
130134
EOF
131135

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "gitcraft"
4-
version = "0.1.0"
4+
version = "0.1.1"
55
edition = "2021"
66
authors = ["John Kagunda [email protected]"]
77
description = "A template project for GitHub-related utilities."

0 commit comments

Comments
 (0)