You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to run block using the current shell without overwriting it since I use direnv.
I use Runme CLI.
I've found that when I set shellscript at the begging of the block then it works good, but every time I save the file in VSCode (with Runme extension) shellscript is replaced with sh and it's not working.
Current state
Block test1:
echo $PATH | tr ":" "\n"
Command: runme run --filename .runbooks/test.runme test1
On the output I got overwrited PATH. This is not what I have when I run echo $PATH in the current shell.
Expected state
Some switch or configuration that preserves shellscript option in file or a flag for Runme CLI that overwrites behavior.
The text was updated successfully, but these errors were encountered:
// shellscripts
// TODO(adamb): breaking change: shellscript was removed to indicate
// that it should be executed as a file. Consider adding it back and
// using attributes to decide how a code block should be executed.
But as a workaround you can write a shell function:
which redirects runme run --dry-run output to a file .runme
delete the first 5 lines (shebang and set)
than executes the command in the same shell: source .runme
here is a poc
runme-here() {
runme run "$@" --dry-run |& sed 1,5d > .runme
source .runme
}
after that you just replace runme run with runme-here
# original command in a subshell
runme run --filename .runbooks/test.runme test1
# running dry-run output in the same shell
runme-here --filename .runbooks/test.runme test1
I'd like to run block using the current shell without overwriting it since I use direnv.
I use Runme CLI.
I've found that when I set
shellscript
at the begging of the block then it works good, but every time I save the file in VSCode (with Runme extension)shellscript
is replaced withsh
and it's not working.Current state
Block test1:
Command:
runme run --filename .runbooks/test.runme test1
On the output I got overwrited PATH. This is not what I have when I run
echo $PATH
in the current shell.Expected state
Some switch or configuration that preserves
shellscript
option in file or a flag for Runme CLI that overwrites behavior.The text was updated successfully, but these errors were encountered: