Skip to content

Commit 3b37957

Browse files
committed
Add exec-path command
1 parent e3098c8 commit 3b37957

2 files changed

Lines changed: 44 additions & 0 deletions

File tree

cmds/exec-path.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* $File: exec-path.js $
3+
* $Date: 2022-03-20 02:45:07 $
4+
* $Revision: $
5+
* $Creator: Jen-Chieh Shen $
6+
* $Notice: See LICENSE.txt for modification and distribution information
7+
* Copyright © 2022 by Shen, Jen-Chieh $
8+
*/
9+
10+
"use strict";
11+
12+
const util = require("../src/util");
13+
14+
exports.command = 'exec-path';
15+
exports.desc = 'print the exec-path from workspace';
16+
17+
exports.handler = async ({}) => {
18+
await util.e_call('exec-path');
19+
};

lisp/exec-path.el

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
;;; exec-path.el --- Print the exec-path from workspace -*- lexical-binding: t; -*-
2+
3+
;;; Commentary:
4+
;;
5+
;; Print the exec-path from workspace
6+
;;
7+
;; $ eask exec-path
8+
;;
9+
10+
;;; Code:
11+
12+
(load-file (expand-file-name
13+
"_prepare.el"
14+
(file-name-directory (nth 1 (member "-scriptload" command-line-args)))))
15+
16+
(defun eask--print-exec-path (path)
17+
"Print out the PATH."
18+
(message "%s" path))
19+
20+
(eask-start
21+
(eask-pkg-init)
22+
(eask--add-bin-exec-path)
23+
(mapc #'eask--print-exec-path exec-path))
24+
25+
;;; exec-path.el ends here

0 commit comments

Comments
 (0)