-
Syntax error in command substitution under Bash 3.2
- Reproduction: Run
dotfiles statusordotfiles add <directory>on macOS (Bash 3.2). The script crashed with a syntax error (unexpected token 'newline') because ofcase "$t" in /*)inside a command substitution incmd_statusandaudit_dir. Bash 3.2 requires balanced parentheses(/*)in this context. - Severity: High (crashed core commands).
- Status: Fixed in 8ad7957.
- Reproduction: Run
-
dotfiles initcloned empty repo instead of explicitly branchingmain- Reproduction: Run
dotfiles init --repo <url-to-empty-bare-repo>. The script usedgit clone, which silently inherited the system'sinit.defaultBranch(oftenmaster) instead of explicitly creatingmain. - Severity: Medium.
- Status: Fixed in 8ad7957.
- Reproduction: Run
-
dotfiles linkreported success on an empty manifest- Reproduction: Run
dotfiles linkon a fresh/absent manifest or a clone that checked out nothing. It would cheerfully walk an empty repo and report "Everything already linked" instead of indicating something is wrong. - Severity: Medium.
- Status: Fixed in 8ad7957.
- Reproduction: Run
-
cmd_statusno longer ignores intra-repo absolute symlinks- Reproduction: Run
dotfiles statusin a repository containing an absolute symlink that points to another file inside the dotfiles repository (e.g.foo -> /Users/user/.dotfiles/bar). - Why: The new
foreign_symlinkshelper incmd_statusis called with only$HOMEas the allowed prefix (stray="$(foreign_symlinks "$DOTFILES_DIR" "$HOME")"). The old code explicitly ignored both"$DOTFILES_DIR"/*and"$HOME"/*. As a result, valid intra-repo absolute symlinks are now falsely flagged as "Machine-specific absolute symlinks". - Severity: Low.
- Reproduction: Run
-
cmd_initmay check out the wrong branch on a fresh clone- Reproduction: Initialize a remote repository with
mainand another alphabetically earlier branch (e.g.,apple). Clone the repository when itsHEADis unborn or points to a non-existent branch. - Why: The new fallback logic in
cmd_initrunsgit_d for-each-ref ... refs/remotes/origin | head -1and blindly checks out whatever branch comes first alphabetically (e.g.appleinstead ofmain), rather than preferring the default branch or specifically falling back tomain. - Severity: Low.
- Reproduction: Initialize a remote repository with
-
Missing validation for paths with
|- Reproduction: Run
dotfiles add "my|file". The script appendsfile|my|file|labelto the manifest. - Why: The pipe character (
|) is the manifest delimiter, and it is not sanitized or escaped. This breaks the awk/IFS parsers, corrupting the manifest. - Severity: High (corrupts manifest).
- Reproduction: Run
(Note: No empty-array expansions like "${ARR[@]}" were found in the script).