Skip to content

Commit 1b75996

Browse files
committed
Use -- to pass custom command to run.js
1 parent 2057f39 commit 1b75996

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

.vscode/settings.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
"_build/**": true
1515
},
1616
"editor.defaultFormatter": "esbenp.prettier-vscode",
17+
"[yaml]": {
18+
"editor.defaultFormatter": "esbenp.prettier-vscode"
19+
},
20+
"[json]": {
21+
"editor.defaultFormatter": "esbenp.prettier-vscode"
22+
},
1723
"rust-analyzer.server.path": "${workspaceFolder}/.flatpak/rust-analyzer.sh",
1824
"rust-analyzer.runnables.command": "${workspaceFolder}/.flatpak/cargo.sh",
1925
"rust-analyzer.files.excludeDirs": [
@@ -23,11 +29,5 @@
2329
"build",
2430
"builddir"
2531
],
26-
"[yaml]": {
27-
"editor.defaultFormatter": "esbenp.prettier-vscode"
28-
},
29-
"[json]": {
30-
"editor.defaultFormatter": "esbenp.prettier-vscode"
31-
},
3232
"vala.languageServerPath": "${workspaceFolder}/.flatpak/vala-language-server.sh"
3333
}

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ lint:
4848

4949
unit:
5050
./build-aux/fun gjs -m ./troll/tst/bin.js test/*.test.js
51+
#./build-aux/wip/run.js build-aux/re.sonny.Workbench.Devel.json -- gjs -m ./troll/tst/bin.js test/*.test.js
5152

5253
# https://github.com/ximion/appstream/issues/398#issuecomment-1129454985
5354
# flatpak run org.freedesktop.appstream.cli validate --override=release-time-missing=info --no-net data/app.metainfo.xml
@@ -61,6 +62,7 @@ unit:
6162

6263
test: unit lint
6364
./build-aux/fun workbench-cli ci demos/src/Welcome
65+
# ./build-aux/wip/run.js build-aux/re.sonny.Workbench.Devel.json -- workbench-cli ci demos/src/Welcome/
6466

6567
ci: setup build test
6668
./build-aux/fun workbench-cli ci demos/src/*

build-aux/wip/run.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ Gio._promisify(
2121

2222
const path = GLib.get_current_dir();
2323
console.debug(programInvocationName, programArgs);
24-
const argv = minimist(programArgs, { boolean: true });
24+
const argv = minimist(programArgs, { boolean: true, "--": true });
2525
console.debug(argv);
2626

27-
const [manifest_path, ...arg] = argv._;
27+
const [manifest_path] = argv._;
2828
if (!manifest_path) {
2929
// eslint-disable-next-line no-restricted-globals
3030
print(`${programInvocationName} [--verbose] [--debug] MANIFEST`);
@@ -123,7 +123,7 @@ await buildCommand(["meson", "install", "-C", "_build"]);
123123
// ]);
124124

125125
// starts workbench
126-
const command = arg.length ? arg : [manifest.command];
126+
const command = argv["--"].length ? argv["--"] : [manifest.command];
127127
await runCommand(command);
128128

129129
function buildCommand(argv) {

0 commit comments

Comments
 (0)