Special characters in `CURRENT_DIR` causes fail
In `scripts/utils.sh`, the variable `CURRENT_DIR` is evaluated by
```bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
```
which may not escape special characters, e.g., space (even we intentionally put them in "").
Shell: `zsh 5.9`
OS: OSX
Fix:
```bash
TMP_DIR=$(dirname "${BASH_SOURCE[0]}")
CURRENT_DIR="$(cd "${TMP_DIR}" && pwd)"
```
0 条评论