From 783d784ced2c24c556440ff25a3e964670e9d7b4 Mon Sep 17 00:00:00 2001 From: jcs090218 Date: Sat, 4 Mar 2023 10:37:18 -0800 Subject: [PATCH 1/6] fix(error): Attempt to improve error message --- .github/workflows/{ => deprecated}/build.yml | 0 .github/workflows/{ => deprecated}/checker.yml | 0 .github/workflows/{ => deprecated}/compat.yml | 0 .github/workflows/{ => deprecated}/compile.yml | 0 .github/workflows/{ => deprecated}/docs.yml | 0 .github/workflows/{ => deprecated}/emacs.yml | 0 .github/workflows/{ => deprecated}/exec.yml | 0 .github/workflows/{ => deprecated}/global.yml | 0 .github/workflows/{ => deprecated}/install.yml | 0 .github/workflows/{ => deprecated}/link.yml | 0 .github/workflows/{ => deprecated}/local.yml | 0 .github/workflows/{ => deprecated}/options.yml | 0 .../workflows/{ => deprecated}/outdated_upgrade.yml | 0 .github/workflows/{ => deprecated}/search.yml | 0 .github/workflows/{ => deprecated}/test_buttercup.yml | 0 .github/workflows/{ => deprecated}/test_ert-runner.yml | 0 .github/workflows/{ => deprecated}/test_ert.yml | 0 .github/workflows/{deprecated => }/error.yml | 0 src/util.js | 10 +++++----- 19 files changed, 5 insertions(+), 5 deletions(-) rename .github/workflows/{ => deprecated}/build.yml (100%) rename .github/workflows/{ => deprecated}/checker.yml (100%) rename .github/workflows/{ => deprecated}/compat.yml (100%) rename .github/workflows/{ => deprecated}/compile.yml (100%) rename .github/workflows/{ => deprecated}/docs.yml (100%) rename .github/workflows/{ => deprecated}/emacs.yml (100%) rename .github/workflows/{ => deprecated}/exec.yml (100%) rename .github/workflows/{ => deprecated}/global.yml (100%) rename .github/workflows/{ => deprecated}/install.yml (100%) rename .github/workflows/{ => deprecated}/link.yml (100%) rename .github/workflows/{ => deprecated}/local.yml (100%) rename .github/workflows/{ => deprecated}/options.yml (100%) rename .github/workflows/{ => deprecated}/outdated_upgrade.yml (100%) rename .github/workflows/{ => deprecated}/search.yml (100%) rename .github/workflows/{ => deprecated}/test_buttercup.yml (100%) rename .github/workflows/{ => deprecated}/test_ert-runner.yml (100%) rename .github/workflows/{ => deprecated}/test_ert.yml (100%) rename .github/workflows/{deprecated => }/error.yml (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/deprecated/build.yml similarity index 100% rename from .github/workflows/build.yml rename to .github/workflows/deprecated/build.yml diff --git a/.github/workflows/checker.yml b/.github/workflows/deprecated/checker.yml similarity index 100% rename from .github/workflows/checker.yml rename to .github/workflows/deprecated/checker.yml diff --git a/.github/workflows/compat.yml b/.github/workflows/deprecated/compat.yml similarity index 100% rename from .github/workflows/compat.yml rename to .github/workflows/deprecated/compat.yml diff --git a/.github/workflows/compile.yml b/.github/workflows/deprecated/compile.yml similarity index 100% rename from .github/workflows/compile.yml rename to .github/workflows/deprecated/compile.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/deprecated/docs.yml similarity index 100% rename from .github/workflows/docs.yml rename to .github/workflows/deprecated/docs.yml diff --git a/.github/workflows/emacs.yml b/.github/workflows/deprecated/emacs.yml similarity index 100% rename from .github/workflows/emacs.yml rename to .github/workflows/deprecated/emacs.yml diff --git a/.github/workflows/exec.yml b/.github/workflows/deprecated/exec.yml similarity index 100% rename from .github/workflows/exec.yml rename to .github/workflows/deprecated/exec.yml diff --git a/.github/workflows/global.yml b/.github/workflows/deprecated/global.yml similarity index 100% rename from .github/workflows/global.yml rename to .github/workflows/deprecated/global.yml diff --git a/.github/workflows/install.yml b/.github/workflows/deprecated/install.yml similarity index 100% rename from .github/workflows/install.yml rename to .github/workflows/deprecated/install.yml diff --git a/.github/workflows/link.yml b/.github/workflows/deprecated/link.yml similarity index 100% rename from .github/workflows/link.yml rename to .github/workflows/deprecated/link.yml diff --git a/.github/workflows/local.yml b/.github/workflows/deprecated/local.yml similarity index 100% rename from .github/workflows/local.yml rename to .github/workflows/deprecated/local.yml diff --git a/.github/workflows/options.yml b/.github/workflows/deprecated/options.yml similarity index 100% rename from .github/workflows/options.yml rename to .github/workflows/deprecated/options.yml diff --git a/.github/workflows/outdated_upgrade.yml b/.github/workflows/deprecated/outdated_upgrade.yml similarity index 100% rename from .github/workflows/outdated_upgrade.yml rename to .github/workflows/deprecated/outdated_upgrade.yml diff --git a/.github/workflows/search.yml b/.github/workflows/deprecated/search.yml similarity index 100% rename from .github/workflows/search.yml rename to .github/workflows/deprecated/search.yml diff --git a/.github/workflows/test_buttercup.yml b/.github/workflows/deprecated/test_buttercup.yml similarity index 100% rename from .github/workflows/test_buttercup.yml rename to .github/workflows/deprecated/test_buttercup.yml diff --git a/.github/workflows/test_ert-runner.yml b/.github/workflows/deprecated/test_ert-runner.yml similarity index 100% rename from .github/workflows/test_ert-runner.yml rename to .github/workflows/deprecated/test_ert-runner.yml diff --git a/.github/workflows/test_ert.yml b/.github/workflows/deprecated/test_ert.yml similarity index 100% rename from .github/workflows/test_ert.yml rename to .github/workflows/deprecated/test_ert.yml diff --git a/.github/workflows/deprecated/error.yml b/.github/workflows/error.yml similarity index 100% rename from .github/workflows/deprecated/error.yml rename to .github/workflows/error.yml diff --git a/src/util.js b/src/util.js index 6777ddc2..7a59348a 100644 --- a/src/util.js +++ b/src/util.js @@ -158,11 +158,11 @@ async function e_call(argv, script, ...args) { let proc = child_process.spawn(cli_args(cmd), { stdio: 'inherit', shell: true }); proc.on('close', function (code) { - if (code == 0) { - resolve(code); - return; - } - throw 'Exit with code: ' + code; + // if (code == 0) { + // resolve(code); + // return; + // } + throw new Error('Exit with code: ' + code); }); }); } From 815adee5ddac3ed14262be7962b789bf0668e4c8 Mon Sep 17 00:00:00 2001 From: jcs090218 Date: Sat, 4 Mar 2023 10:40:51 -0800 Subject: [PATCH 2/6] Revert comment --- src/util.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util.js b/src/util.js index 7a59348a..87471b71 100644 --- a/src/util.js +++ b/src/util.js @@ -158,10 +158,10 @@ async function e_call(argv, script, ...args) { let proc = child_process.spawn(cli_args(cmd), { stdio: 'inherit', shell: true }); proc.on('close', function (code) { - // if (code == 0) { - // resolve(code); - // return; - // } + if (code == 0) { + resolve(code); + return; + } throw new Error('Exit with code: ' + code); }); }); From 73e7c6b55dd9f68d02fb75f8e449046ef50c253f Mon Sep 17 00:00:00 2001 From: jcs090218 Date: Sat, 4 Mar 2023 10:47:42 -0800 Subject: [PATCH 3/6] Try process.exit --- src/util.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util.js b/src/util.js index 87471b71..82094eea 100644 --- a/src/util.js +++ b/src/util.js @@ -162,7 +162,9 @@ async function e_call(argv, script, ...args) { resolve(code); return; } - throw new Error('Exit with code: ' + code); + console.log(''); + console.log('Exit with code: ' + code); + process.exit(code); }); }); } From fada9e2d6734b912abe44b7dc69e5e75e97e269f Mon Sep 17 00:00:00 2001 From: jcs090218 Date: Sat, 4 Mar 2023 10:52:25 -0800 Subject: [PATCH 4/6] Try process.exit --- src/util.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/util.js b/src/util.js index 82094eea..c1b1f506 100644 --- a/src/util.js +++ b/src/util.js @@ -162,8 +162,6 @@ async function e_call(argv, script, ...args) { resolve(code); return; } - console.log(''); - console.log('Exit with code: ' + code); process.exit(code); }); }); From f303d72cd128c3e7512c3631a9a33cf89cc4d144 Mon Sep 17 00:00:00 2001 From: jcs090218 Date: Sat, 4 Mar 2023 10:55:22 -0800 Subject: [PATCH 5/6] Revert workflow --- .github/workflows/{deprecated => }/build.yml | 0 .github/workflows/{deprecated => }/checker.yml | 0 .github/workflows/{deprecated => }/compat.yml | 0 .github/workflows/{deprecated => }/compile.yml | 0 .github/workflows/{ => deprecated}/error.yml | 0 .github/workflows/{deprecated => }/docs.yml | 0 .github/workflows/{deprecated => }/emacs.yml | 0 .github/workflows/{deprecated => }/exec.yml | 0 .github/workflows/{deprecated => }/global.yml | 0 .github/workflows/{deprecated => }/install.yml | 0 .github/workflows/{deprecated => }/link.yml | 0 .github/workflows/{deprecated => }/local.yml | 0 .github/workflows/{deprecated => }/options.yml | 0 .github/workflows/{deprecated => }/outdated_upgrade.yml | 0 .github/workflows/{deprecated => }/search.yml | 0 .github/workflows/{deprecated => }/test_buttercup.yml | 0 .github/workflows/{deprecated => }/test_ert-runner.yml | 0 .github/workflows/{deprecated => }/test_ert.yml | 0 18 files changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{deprecated => }/build.yml (100%) rename .github/workflows/{deprecated => }/checker.yml (100%) rename .github/workflows/{deprecated => }/compat.yml (100%) rename .github/workflows/{deprecated => }/compile.yml (100%) rename .github/workflows/{ => deprecated}/error.yml (100%) rename .github/workflows/{deprecated => }/docs.yml (100%) rename .github/workflows/{deprecated => }/emacs.yml (100%) rename .github/workflows/{deprecated => }/exec.yml (100%) rename .github/workflows/{deprecated => }/global.yml (100%) rename .github/workflows/{deprecated => }/install.yml (100%) rename .github/workflows/{deprecated => }/link.yml (100%) rename .github/workflows/{deprecated => }/local.yml (100%) rename .github/workflows/{deprecated => }/options.yml (100%) rename .github/workflows/{deprecated => }/outdated_upgrade.yml (100%) rename .github/workflows/{deprecated => }/search.yml (100%) rename .github/workflows/{deprecated => }/test_buttercup.yml (100%) rename .github/workflows/{deprecated => }/test_ert-runner.yml (100%) rename .github/workflows/{deprecated => }/test_ert.yml (100%) diff --git a/.github/workflows/deprecated/build.yml b/.github/workflows/build.yml similarity index 100% rename from .github/workflows/deprecated/build.yml rename to .github/workflows/build.yml diff --git a/.github/workflows/deprecated/checker.yml b/.github/workflows/checker.yml similarity index 100% rename from .github/workflows/deprecated/checker.yml rename to .github/workflows/checker.yml diff --git a/.github/workflows/deprecated/compat.yml b/.github/workflows/compat.yml similarity index 100% rename from .github/workflows/deprecated/compat.yml rename to .github/workflows/compat.yml diff --git a/.github/workflows/deprecated/compile.yml b/.github/workflows/compile.yml similarity index 100% rename from .github/workflows/deprecated/compile.yml rename to .github/workflows/compile.yml diff --git a/.github/workflows/error.yml b/.github/workflows/deprecated/error.yml similarity index 100% rename from .github/workflows/error.yml rename to .github/workflows/deprecated/error.yml diff --git a/.github/workflows/deprecated/docs.yml b/.github/workflows/docs.yml similarity index 100% rename from .github/workflows/deprecated/docs.yml rename to .github/workflows/docs.yml diff --git a/.github/workflows/deprecated/emacs.yml b/.github/workflows/emacs.yml similarity index 100% rename from .github/workflows/deprecated/emacs.yml rename to .github/workflows/emacs.yml diff --git a/.github/workflows/deprecated/exec.yml b/.github/workflows/exec.yml similarity index 100% rename from .github/workflows/deprecated/exec.yml rename to .github/workflows/exec.yml diff --git a/.github/workflows/deprecated/global.yml b/.github/workflows/global.yml similarity index 100% rename from .github/workflows/deprecated/global.yml rename to .github/workflows/global.yml diff --git a/.github/workflows/deprecated/install.yml b/.github/workflows/install.yml similarity index 100% rename from .github/workflows/deprecated/install.yml rename to .github/workflows/install.yml diff --git a/.github/workflows/deprecated/link.yml b/.github/workflows/link.yml similarity index 100% rename from .github/workflows/deprecated/link.yml rename to .github/workflows/link.yml diff --git a/.github/workflows/deprecated/local.yml b/.github/workflows/local.yml similarity index 100% rename from .github/workflows/deprecated/local.yml rename to .github/workflows/local.yml diff --git a/.github/workflows/deprecated/options.yml b/.github/workflows/options.yml similarity index 100% rename from .github/workflows/deprecated/options.yml rename to .github/workflows/options.yml diff --git a/.github/workflows/deprecated/outdated_upgrade.yml b/.github/workflows/outdated_upgrade.yml similarity index 100% rename from .github/workflows/deprecated/outdated_upgrade.yml rename to .github/workflows/outdated_upgrade.yml diff --git a/.github/workflows/deprecated/search.yml b/.github/workflows/search.yml similarity index 100% rename from .github/workflows/deprecated/search.yml rename to .github/workflows/search.yml diff --git a/.github/workflows/deprecated/test_buttercup.yml b/.github/workflows/test_buttercup.yml similarity index 100% rename from .github/workflows/deprecated/test_buttercup.yml rename to .github/workflows/test_buttercup.yml diff --git a/.github/workflows/deprecated/test_ert-runner.yml b/.github/workflows/test_ert-runner.yml similarity index 100% rename from .github/workflows/deprecated/test_ert-runner.yml rename to .github/workflows/test_ert-runner.yml diff --git a/.github/workflows/deprecated/test_ert.yml b/.github/workflows/test_ert.yml similarity index 100% rename from .github/workflows/deprecated/test_ert.yml rename to .github/workflows/test_ert.yml From 276fb09e38d746c20ecff0104669bf2536fb9f0c Mon Sep 17 00:00:00 2001 From: jcs090218 Date: Sat, 4 Mar 2023 10:58:17 -0800 Subject: [PATCH 6/6] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ae09d15..6097b665 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how * Support DSL `package-descriptor` (#124) * Resolve the potential symlink to the bash script (#24, #125, and #126) * Workaround for arguments that contain whitespaces (#128 and #129) +* Silent unnecessary Node's stacktrace (#134 and #136) ## 0.7.x > Released Sep 08, 2022