Skip to content

Commit 707221b

Browse files
committed
Consistent naming
1 parent c6332d2 commit 707221b

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

scripts/install.sh

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
# Options:
99
# --prefix DIR Installation directory (default: ~/.devcontainers)
10-
# --version VER CLI version to install (default: latest)
10+
# --version VER Dev Containers CLI version to install (default: latest)
1111
# --node-version VER Node.js major version (default: 20)
1212
# --update Update existing installation to latest versions
1313
# --uninstall Remove the installation
@@ -59,15 +59,15 @@ error() {
5959
# Print usage information
6060
usage() {
6161
cat << 'EOF'
62-
Install @devcontainers/cli with bundled Node.js
62+
Install the Dev Containers CLI with bundled Node.js
6363
6464
Usage:
6565
curl -fsSL https://raw.githubusercontent.com/devcontainers/cli/main/scripts/install.sh | sh
6666
sh install.sh [OPTIONS]
6767
6868
Options:
6969
--prefix DIR Installation directory (default: ~/.devcontainers)
70-
--version VER CLI version to install (default: latest)
70+
--version VER Dev Containers CLI version to install (default: latest)
7171
--node-version VER Node.js major version (default: 20)
7272
--update Update existing installation to latest versions
7373
--uninstall Remove the installation
@@ -259,16 +259,16 @@ fetch() {
259259
# Resolve "latest" CLI version from npm registry
260260
resolve_cli_version() {
261261
if [ "$CLI_VERSION" = "latest" ]; then
262-
say "Resolving latest CLI version..."
262+
say "Resolving latest Dev Containers CLI version..."
263263
version=$(fetch "https://registry.npmjs.org/@devcontainers/cli/latest" | \
264264
sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -1)
265265
if [ -z "$version" ]; then
266-
error "Failed to resolve latest CLI version from npm registry"
266+
error "Failed to resolve latest Dev Containers CLI version from npm registry"
267267
exit 1
268268
fi
269269
CLI_VERSION="$version"
270270
fi
271-
say "CLI version: $CLI_VERSION"
271+
say "Dev Containers CLI version: $CLI_VERSION"
272272
}
273273

274274
# Resolve full Node.js version from major version
@@ -376,9 +376,9 @@ install_cli() {
376376

377377
# Check if already installed
378378
if [ -d "$version_dir/package" ] && [ -f "$version_dir/package/devcontainer.js" ]; then
379-
say "CLI v$CLI_VERSION is already installed"
379+
say "Dev Containers CLI v$CLI_VERSION is already installed"
380380
else
381-
say "Downloading CLI v$CLI_VERSION..."
381+
say "Downloading Dev Containers CLI v$CLI_VERSION..."
382382

383383
tmp_dir=$(mktemp -d)
384384
trap 'rm -rf "$tmp_dir"' EXIT
@@ -388,7 +388,7 @@ install_cli() {
388388

389389
download "$cli_url" "$tarball"
390390

391-
say "Extracting CLI..."
391+
say "Extracting Dev Containers CLI..."
392392
mkdir -p "$version_dir"
393393
tar -xzf "$tarball" -C "$version_dir"
394394

@@ -397,7 +397,7 @@ install_cli() {
397397
fi
398398

399399
# Update current symlink
400-
say "Activating CLI v$CLI_VERSION..."
400+
say "Activating Dev Containers CLI v$CLI_VERSION..."
401401
ln -sfn "$CLI_VERSION" "$cli_dir/current"
402402

403403
# Save metadata
@@ -415,7 +415,7 @@ create_wrapper() {
415415

416416
cat > "$wrapper" << 'WRAPPER_EOF'
417417
#!/bin/sh
418-
# devcontainer CLI wrapper - generated by install.sh
418+
# Dev Containers CLI wrapper - generated by install.sh
419419
# https://github.com/devcontainers/cli
420420
421421
set -e
@@ -447,7 +447,7 @@ fi
447447
448448
# Verify CLI exists
449449
if [ ! -f "$CLI_ENTRY" ]; then
450-
echo "Error: CLI not found at $CLI_ENTRY" >&2
450+
echo "Error: Dev Containers CLI not found at $CLI_ENTRY" >&2
451451
echo "Installation may be corrupted. Please reinstall:" >&2
452452
echo " curl -fsSL https://raw.githubusercontent.com/devcontainers/cli/main/scripts/install.sh | sh" >&2
453453
exit 1
@@ -474,7 +474,7 @@ verify_installation() {
474474
fi
475475

476476
if [ ! -f "$cli_entry" ]; then
477-
error "CLI entry point not found"
477+
error "Dev Containers CLI entry point not found"
478478
exit 1
479479
fi
480480

@@ -488,7 +488,7 @@ verify_installation() {
488488
if [ -n "$version" ]; then
489489
say "Installed: devcontainer $version"
490490
else
491-
warn "Could not verify CLI version, but files are in place"
491+
warn "Could not verify Dev Containers CLI version, but files are in place"
492492
fi
493493
}
494494

@@ -531,7 +531,7 @@ do_update() {
531531
current_node=$(cat "$INSTALL_PREFIX/.metadata/node-version" 2>/dev/null || echo "unknown")
532532

533533
say "Current installation:"
534-
say " CLI: v$current_cli"
534+
say " Dev Containers CLI: v$current_cli"
535535
say " Node.js: v$current_node"
536536

537537
# Resolve latest versions
@@ -541,9 +541,9 @@ do_update() {
541541

542542
# Update components
543543
if [ "$current_cli" = "$CLI_VERSION" ]; then
544-
say "CLI is already up to date"
544+
say "Dev Containers CLI is already up to date"
545545
else
546-
say "Updating CLI: v$current_cli -> v$CLI_VERSION"
546+
say "Updating Dev Containers CLI: v$current_cli -> v$CLI_VERSION"
547547
install_cli
548548
fi
549549

@@ -635,7 +635,7 @@ main() {
635635
parse_args "$@"
636636

637637
echo ""
638-
say "${BOLD}@devcontainers/cli installer${RESET}"
638+
say "${BOLD}Dev Containers CLI installer${RESET}"
639639
echo ""
640640

641641
# Handle uninstall

scripts/install.test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ test_help_flag() {
152152

153153
output=$(sh "$INSTALL_SCRIPT" --help 2>&1) || true
154154

155-
assert_contains "$output" "Install @devcontainers/cli" "--help shows description"
155+
assert_contains "$output" "Install the Dev Containers CLI" "--help shows description"
156156
assert_contains "$output" "--prefix" "--help shows --prefix option"
157157
assert_contains "$output" "--version" "--help shows --version option"
158158
assert_contains "$output" "--node-version" "--help shows --node-version option"
@@ -168,7 +168,7 @@ test_help_short_flag() {
168168
setup
169169

170170
output=$(sh "$INSTALL_SCRIPT" -h 2>&1) || true
171-
assert_contains "$output" "Install @devcontainers/cli" "-h shows help"
171+
assert_contains "$output" "Install the Dev Containers CLI" "-h shows help"
172172

173173
teardown
174174
}
@@ -419,7 +419,7 @@ test_wrapper_missing_cli() {
419419

420420
output=$("$prefix/bin/devcontainer" --version 2>&1) && rc=0 || rc=$?
421421
assert_exit_code "1" "$rc" "wrapper exits 1 when CLI missing"
422-
assert_contains "$output" "CLI not found" "wrapper reports missing CLI"
422+
assert_contains "$output" "Dev Containers CLI not found" "wrapper reports missing Dev Containers CLI"
423423

424424
teardown
425425
}

0 commit comments

Comments
 (0)