Skip to content

Commit 207c759

Browse files
authored
fix(run): Workaround for run command (again) (#189)
1 parent fcb071d commit 207c759

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

cmds/core/run.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ function spawn(command, options) {
100100
* @return Return updated command array.
101101
*/
102102
function replaceEaskExec(cmds) {
103-
if (!IS_PKG) return;
104103
for (let index = 0; index < cmds.length; ++index) {
105104
if (cmds[index] == "eask") {
106105
cmds[index] = process.argv[1]; // XXX: This is `/snapshot/cli/eask`

lisp/_prepare.el

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ Arguments FNC and ARGS are used for advice `:around'."
7575
(defconst eask-invocation (getenv "EASK_INVOCATION")
7676
"Eask invocation program.")
7777

78+
(defconst eask-is-pkg (getenv "EASK_IS_PKG")
79+
"Eask is pkg.")
80+
7881
;;
7982
;;; Execution
8083

lisp/core/run.el

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@
3838
(defun eask--export-command (command)
3939
"Export COMMAND instruction."
4040
(ignore-errors (make-directory eask-homedir t)) ; generate dir `~/.eask/'
41-
;; XXX: Due to `MODULE_NOT_FOUND` not found error from vcpkg,
42-
;; see https://github.com/vercel/pkg/issues/1356.
43-
;;
44-
;; We must split up all commands!
45-
(setq command (eask-s-replace " && " "\n" command))
41+
(when eask-is-pkg
42+
;; XXX: Due to `MODULE_NOT_FOUND` not found error from vcpkg,
43+
;; see https://github.com/vercel/pkg/issues/1356.
44+
;;
45+
;; We must split up all commands!
46+
(setq command (eask-s-replace " && " "\n" command)))
4647
(write-region (concat command "\n") nil eask--run-file t))
4748

4849
(defun eask--unmatched-scripts (scripts)

src/util.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ function setup_env() {
120120
/* Home Directory */
121121
process.env.EASK_INVOCATION = _invocation();
122122
process.env.EASK_HOMEDIR = EASK_HOMEDIR;
123+
if (IS_PKG) process.env.EASK_IS_PKG = IS_PKG;
123124

124125
if (GITHUB_ACTIONS) {
125126
/* XXX: isTTY flag will always be undefined in GitHub Actions; we will have

0 commit comments

Comments
 (0)