Skip to content

Commit

Permalink
fix(run): Workaround for run command (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Sep 20, 2023
1 parent fcb071d commit f73ae55
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
1 change: 0 additions & 1 deletion cmds/core/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ function spawn(command, options) {
* @return Return updated command array.
*/
function replaceEaskExec(cmds) {
if (!IS_PKG) return;
for (let index = 0; index < cmds.length; ++index) {
if (cmds[index] == "eask") {
cmds[index] = process.argv[1]; // XXX: This is `/snapshot/cli/eask`
Expand Down
3 changes: 3 additions & 0 deletions lisp/_prepare.el
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ Arguments FNC and ARGS are used for advice `:around'."
(defconst eask-invocation (getenv "EASK_INVOCATION")
"Eask invocation program.")

(defconst eask-is-pkg (getenv "EASK_IS_PKG")
"Eask is pkg.")

;;
;;; Execution

Expand Down
11 changes: 6 additions & 5 deletions lisp/core/run.el
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@
(defun eask--export-command (command)
"Export COMMAND instruction."
(ignore-errors (make-directory eask-homedir t)) ; generate dir `~/.eask/'
;; XXX: Due to `MODULE_NOT_FOUND` not found error from vcpkg,
;; see https://github.com/vercel/pkg/issues/1356.
;;
;; We must split up all commands!
(setq command (eask-s-replace " && " "\n" command))
(when eask-is-pkg
;; XXX: Due to `MODULE_NOT_FOUND` not found error from vcpkg,
;; see https://github.com/vercel/pkg/issues/1356.
;;
;; We must split up all commands!
(setq command (eask-s-replace " && " "\n" command)))
(write-region (concat command "\n") nil eask--run-file t))

(defun eask--unmatched-scripts (scripts)
Expand Down
1 change: 1 addition & 0 deletions src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ function setup_env() {
/* Home Directory */
process.env.EASK_INVOCATION = _invocation();
process.env.EASK_HOMEDIR = EASK_HOMEDIR;
if (IS_PKG) process.env.EASK_IS_PKG = IS_PKG;

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

0 comments on commit f73ae55

Please sign in to comment.