Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

子プロセスに環境変数を渡したい #13

Open
Khronos31 opened this issue Apr 11, 2021 · 3 comments
Open

子プロセスに環境変数を渡したい #13

Khronos31 opened this issue Apr 11, 2021 · 3 comments

Comments

@Khronos31
Copy link

環境変数の扱い方がわからなかったのですが、これは未実装でしょうか

$ ln -s $(which unko.shout) /bin/shout
$ which echo-sd
/usr/local/home-commands/echo-sd
$ cat ushout.glue
import PATH
bash '-c' 'echo $PATH'
shout
$ glue ushout.glue
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
/usr/bin/shout: line 3: echo-sd: command not found
      👑
    (💩💩💩)
   (💩👁💩👁💩)
  (💩💩💩👃💩💩💩)
 (💩💩💩💩👄💩💩💩💩)
@ryuichiueda
Copy link
Owner

おそらく未実装です。実装の方向で考えます。

@ryuichiueda
Copy link
Owner

とりあえず実装できたものが手元にあるので少々お待ちください。

ryuichiueda added a commit that referenced this issue Apr 12, 2021
@ryuichiueda
Copy link
Owner

対応しましたー

$ ./glue --version
GlueLang v0.2.5 🌸🌸🌸

$ cat hoge.glue 
import PATH
bash '-c' 'echo $PATH'
unko.shout
$ ./glue hoge.glue 
/opt/ros/noetic/bin/:/home/ueda/go/bin/:略
_人人人人人人_
> 突然の死 <
 ̄Y^Y^Y^Y^Y^Y^ ̄
      👑
    (💩💩💩)
   (💩👁💩👁💩)
  (💩💩💩👃💩💩💩)
 (💩💩💩💩👄💩💩💩💩)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants