Skip to content

Commit 9c14c26

Browse files
authored
Merge pull request #253 from lets-cli/fix-bash-resolving-error
do not set SHELL to avoid bash: file not found error. set LETS_SHELL …
2 parents 568bc46 + cbdd16f commit 9c14c26

7 files changed

Lines changed: 35 additions & 4 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# vendor/
1616
.idea
1717
.vscode
18+
!.vscode/launch.json
1819
.history
1920
dist
2021

@@ -26,3 +27,6 @@ _lets
2627
coverage.out
2728
node_modules
2829
TODO
30+
31+
.DS_Store
32+
__debug_bin*

.vscode/launch.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Launch Package",
9+
"type": "go",
10+
"request": "launch",
11+
"mode": "auto",
12+
"program": "${fileDirname}"
13+
},
14+
{
15+
"name": "Run",
16+
"type": "go",
17+
"request": "launch",
18+
"mode": "auto",
19+
"program": "${workspaceRoot}",
20+
"args": []
21+
}
22+
]
23+
}

docs/docs/changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ title: Changelog
55

66
## [Unreleased](https://github.com/lets-cli/lets/releases/tag/v0.0.X)
77

8+
## [0.0.53](https://github.com/lets-cli/lets/releases/tag/v0.0.53)
9+
10+
* `[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.
11+
812
## [0.0.52](https://github.com/lets-cli/lets/releases/tag/v0.0.52)
913

1014
* `[Dependency]` update and pin goreleaser

docs/docs/env.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ title: Environment
1919
* `LETS_COMMAND_WORK_DIR` - absolute path to `work_dir` specified in command.
2020
* `LETS_CONFIG` - absolute path to lets config file.
2121
* `LETS_CONFIG_DIR` - absolute path to lets config file firectory.
22-
* `SHELL` - shell from config or command.
22+
* `LETS_SHELL` - shell from config or command.
2323
* `LETSOPT_<>` - options parsed from command `options` (docopt string). E.g `lets run --env=prod --reload` will be `LETSOPT_ENV=prod` and `LETSOPT_RELOAD=true`
2424
* `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`
2525

executor/executor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ func (e *Executor) setupEnv(osCmd *exec.Cmd, command *config.Command, shell stri
208208
"LETS_COMMAND_WORK_DIR": osCmd.Dir,
209209
"LETS_CONFIG": filepath.Base(e.cfg.FilePath),
210210
"LETS_CONFIG_DIR": filepath.Dir(e.cfg.FilePath),
211-
"SHELL": shell,
211+
"LETS_SHELL": shell,
212212
}
213213

214214
checksumEnvMap := getChecksumEnvMap(command.ChecksumMap)

lets.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ commands:
114114

115115
run-docs:
116116
work_dir: docs
117-
cmd: npm start
117+
cmd: npm start

tests/command_shell/lets.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ shell: bash
33
commands:
44
show-shell:
55
shell: /bin/sh
6-
cmd: echo "$SHELL"
6+
cmd: echo "$LETS_SHELL"

0 commit comments

Comments
 (0)