mirror of
https://github.com/tj/n.git
synced 2024-11-24 19:46:56 +01:00
Add single quotes around parameters in error messages
This commit is contained in:
parent
0664bc5b6f
commit
6fc267147a
@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- internal: improve shell script based on ShellCheck suggestions, quoting variables use etc [#187] [#465]
|
- internal: improve shell script based on ShellCheck suggestions, quoting variables use etc [#187] [#465]
|
||||||
|
- put single quote marks around parameters to clarify error messages [#485]
|
||||||
|
|
||||||
## [3.0.2] (2019-04-07)
|
## [3.0.2] (2019-04-07)
|
||||||
|
|
||||||
@ -86,6 +87,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
[#465]: https://github.com/tj/n/issues/465
|
[#465]: https://github.com/tj/n/issues/465
|
||||||
[#466]: https://github.com/tj/n/issues/466
|
[#466]: https://github.com/tj/n/issues/466
|
||||||
[#467]: https://github.com/tj/n/issues/467
|
[#467]: https://github.com/tj/n/issues/467
|
||||||
|
[#485]: https://github.com/tj/n/issues/485
|
||||||
[#512]: https://github.com/tj/n/issues/512
|
[#512]: https://github.com/tj/n/issues/512
|
||||||
[#516]: https://github.com/tj/n/issues/516
|
[#516]: https://github.com/tj/n/issues/516
|
||||||
[#518]: https://github.com/tj/n/issues/518
|
[#518]: https://github.com/tj/n/issues/518
|
||||||
|
8
bin/n
8
bin/n
@ -500,7 +500,7 @@ install() {
|
|||||||
| grep -E "^$version" \
|
| grep -E "^$version" \
|
||||||
| tail -n1)"
|
| tail -n1)"
|
||||||
|
|
||||||
test "$version" || abort "invalid version ${1#v}"
|
test "$version" || abort "invalid version '${1#v}'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local dir="${VERSIONS_DIR[$DEFAULT]}/$version"
|
local dir="${VERSIONS_DIR[$DEFAULT]}/$version"
|
||||||
@ -518,7 +518,7 @@ install() {
|
|||||||
log install "${BINS[$DEFAULT]}-v$version"
|
log install "${BINS[$DEFAULT]}-v$version"
|
||||||
|
|
||||||
local url="$(tarball_url "$version")"
|
local url="$(tarball_url "$version")"
|
||||||
is_ok "$url" || is_oss_ok "$url" || abort "invalid version $version"
|
is_ok "$url" || is_oss_ok "$url" || abort "invalid version '$version'"
|
||||||
|
|
||||||
log mkdir "$dir"
|
log mkdir "$dir"
|
||||||
if ! mkdir -p "$dir"; then
|
if ! mkdir -p "$dir"; then
|
||||||
@ -603,7 +603,7 @@ display_bin_path_for_version() {
|
|||||||
if test -f "$bin"; then
|
if test -f "$bin"; then
|
||||||
printf "%s\n" "$bin"
|
printf "%s\n" "$bin"
|
||||||
else
|
else
|
||||||
abort "$1 is not installed"
|
abort "'$1' is not installed"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -634,7 +634,7 @@ execute_with_version() {
|
|||||||
if test -f "$bin"; then
|
if test -f "$bin"; then
|
||||||
exec "$bin" "$@"
|
exec "$bin" "$@"
|
||||||
else
|
else
|
||||||
abort "$version is not installed"
|
abort "'$version' is not installed"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user