Skip to content

Print home-relative install paths with ~ prefix#584

Closed
dustinvannoy-db wants to merge 1 commit into
install-from-databricks-agent-skillsfrom
fix/display-home-paths-tilde
Closed

Print home-relative install paths with ~ prefix#584
dustinvannoy-db wants to merge 1 commit into
install-from-databricks-agent-skillsfrom
fix/display-home-paths-tilde

Conversation

@dustinvannoy-db

Copy link
Copy Markdown
Collaborator

What

Cosmetic fix to installer success/log output. Three ok lines printed their destination with ${dir#$HOME/}, which strips the $HOME/ prefix — so global-scope installs logged bare, project-relative-looking strings:

✓ Agent skills (42, link) → .gemini/skills
✓ Agent skills (42, link) → .codeium/windsurf/skills
✓ Agent skills (42, link) → .gemini/antigravity/skills

Now:

✓ Agent skills (42, link) → ~/.gemini/skills
✓ Agent skills (42, link) → ~/.codeium/windsurf/skills
✓ Agent skills (42, link) → ~/.gemini/antigravity/skills

This matches the style already used by the uninstall plan output (install.sh:771).

Lines changed: 2072, 2135 (agent skills), 2492 (MLflow skills), plus the new TILDE constant at 85.

Note on why this isn't a literal ~

The obvious change is ${dir/#$HOME/~}, copying the uninstall-plan idiom. That form is not portable, and would have been a silent no-op for many users:

bash ${dir/#$HOME/~}
3.2.57 (macOS /bin/bash) ~/.gemini/skills
5.2.37 (Homebrew, Linux) /Users/me/.gemini/skills

bash 5.2+ tilde-expands a bare ~ in the replacement text, turning it straight back into $HOME. Since the installer is commonly run via curl … | bash — picking up whichever bash is first on PATH — the literal form would leave the confusing output in place on Linux and for Homebrew-bash users. Escaping (\~) fails the other way, emitting a literal backslash on 3.2.

Holding the ~ in a variable (TILDE="~") suppresses tilde expansion and is correct on both. Verified on both versions.

The pre-existing ${p/#$HOME/~} lines in the uninstall path have the same latent issue, but they're out of scope here and left untouched.

Verification

  • bash -n install.sh passes on both 3.2.57 and 5.2.37.
  • Output format confirmed on both versions for .gemini/skills, .codeium/windsurf/skills, .gemini/antigravity/skills, and a non-$HOME project path (left absolute, as expected).
  • End-to-end run with a sandboxed $HOME: log lines print ~/… while the real directories are still created at the same absolute paths.
  • git diff touches only display strings plus the new constant — every mkdir -p "$dir", cp -R, and ln -s destination is unchanged.

Scope

Display-only. No changes to install destination logic, path construction, scope resolution (base_dir), antigravity/windsurf/gemini destination computation, or install_genie_code_skills.py.

This pull request and its description were written by Isaac.

Global-scope installs logged their destination via ${dir#$HOME/}, which
strips the $HOME/ prefix and leaves bare strings like ".gemini/skills"
or ".codeium/windsurf/skills" — making absolute home paths look
project-relative.

Print them as ~/.gemini/skills instead, matching the style already used
by the uninstall plan output.

The replacement text is held in a TILDE variable rather than written as
a literal ~: bash 5.2+ tilde-expands a bare ~ in the replacement of
${var/#pat/~} straight back into $HOME, so the literal form is a silent
no-op there (bash 3.2 handles it, 5.2 does not). The variable form is
correct on both.

Display-only — no install destination or path construction changes.

Co-authored-by: Isaac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant