diff --git a/.gitignore b/.gitignore index 56e00689..66e68a82 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ # vendor/ .idea .vscode +!.vscode/launch.json .history dist @@ -26,3 +27,6 @@ _lets coverage.out node_modules TODO + +.DS_Store +__debug_bin* \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..59df90af --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,23 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Launch Package", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "${fileDirname}" + }, + { + "name": "Run", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "${workspaceRoot}", + "args": [] + } + ] +} \ No newline at end of file diff --git a/docs/docs/changelog.md b/docs/docs/changelog.md index 81fe3d62..3f16666b 100644 --- a/docs/docs/changelog.md +++ b/docs/docs/changelog.md @@ -5,6 +5,10 @@ title: Changelog ## [Unreleased](https://github.com/lets-cli/lets/releases/tag/v0.0.X) +## [0.0.53](https://github.com/lets-cli/lets/releases/tag/v0.0.53) + +* `[Fixed]` change `SHELL` env to `LETS_SHELL` because setting system variable `SHELL` to just `bash` without full path to binary cases and error in some cases. + ## [0.0.52](https://github.com/lets-cli/lets/releases/tag/v0.0.52) * `[Dependency]` update and pin goreleaser diff --git a/docs/docs/env.md b/docs/docs/env.md index f264c93e..af9c06e1 100644 --- a/docs/docs/env.md +++ b/docs/docs/env.md @@ -19,7 +19,7 @@ title: Environment * `LETS_COMMAND_WORK_DIR` - absolute path to `work_dir` specified in command. * `LETS_CONFIG` - absolute path to lets config file. * `LETS_CONFIG_DIR` - absolute path to lets config file firectory. -* `SHELL` - shell from config or command. +* `LETS_SHELL` - shell from config or command. * `LETSOPT_<>` - options parsed from command `options` (docopt string). E.g `lets run --env=prod --reload` will be `LETSOPT_ENV=prod` and `LETSOPT_RELOAD=true` * `LETSCLI_<>` - options which values is a options usage. E.g `lets run --env=prod --reload` will be `LETSCLI_ENV=--env=prod` and `LETSCLI_RELOAD=--reload` diff --git a/executor/executor.go b/executor/executor.go index eccc3415..796e366d 100644 --- a/executor/executor.go +++ b/executor/executor.go @@ -208,7 +208,7 @@ func (e *Executor) setupEnv(osCmd *exec.Cmd, command *config.Command, shell stri "LETS_COMMAND_WORK_DIR": osCmd.Dir, "LETS_CONFIG": filepath.Base(e.cfg.FilePath), "LETS_CONFIG_DIR": filepath.Dir(e.cfg.FilePath), - "SHELL": shell, + "LETS_SHELL": shell, } checksumEnvMap := getChecksumEnvMap(command.ChecksumMap) diff --git a/lets.yaml b/lets.yaml index 2ff4ff19..7e46398e 100644 --- a/lets.yaml +++ b/lets.yaml @@ -114,4 +114,4 @@ commands: run-docs: work_dir: docs - cmd: npm start + cmd: npm start \ No newline at end of file diff --git a/tests/command_shell/lets.yaml b/tests/command_shell/lets.yaml index 5cd2f8dd..a4e67383 100644 --- a/tests/command_shell/lets.yaml +++ b/tests/command_shell/lets.yaml @@ -3,4 +3,4 @@ shell: bash commands: show-shell: shell: /bin/sh - cmd: echo "$SHELL" + cmd: echo "$LETS_SHELL"