Skip to content

Release v1.5.11: command name follows argv[0], Windows installer fix - #209

Merged
ysyneu merged 6 commits into
mainfrom
feat/skill-command-name
Oct 8, 2026
Merged

ysyneu merged 6 commits into
mainfrom
feat/skill-command-name

Conversation

@ysyneu

@ysyneu ysyneu commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Release branch for v1.5.11.

  • Name the CLI after the command word it was invoked as #207 — the CLI names itself after argv[0]: help, errors and shell completion say fduty when the binary is installed as fduty. update replaces the running binary in place (keeps its install dir and name). install.sh no longer rewrites completion with sed; install.ps1 honors INSTALLED_NAME. The bundled skills/flashduty uses flashduty.
  • Run install.ps1 behavior tests on Windows #208 — Windows install.ps1 behavior tests on PowerShell 5.1 and 7, plus a fix they found: an executable that was moved aside while still running made the next install fail ("Cannot create a file when that file already exists"); it is now moved aside under a unique name and stale copies that are no longer running are cleaned up.

Testing

CI on the branch head: build (ubuntu / macos / windows), lint, CodeQL, shellcheck, install.ps1 behavior (6/6 cases on both shells). make check and make check-cards pass locally.

Release

Merging updates the mirrored install scripts; tag v1.5.11 on the merge commit right after.

ysyneu added 6 commits October 8, 2026 05:06
The root command now takes its name from os.Args[0], so a copy installed
under another name (install.sh INSTALLED_NAME) shows that name in help,
examples, flag usages, errors, update notices and completion scripts.
Help and error text stays authored with the canonical "flashduty" and is
rewritten to the invoked name at startup; the default name runs the tree
unchanged.

Completion scripts are now generated by the installed binary under its
own name, so install.sh no longer rewrites them with sed.

The bundled skill and its scripts now call the CLI by its default name,
flashduty, and help strings that used another name now use flashduty.
`update` now resolves the running binary (os.Executable, symlinks
resolved) and passes its directory and file name to the installer as
FLASHDUTY_INSTALL_DIR and INSTALLED_NAME, so a copy installed under
another name or directory is replaced in place instead of a fresh
default-named copy being installed elsewhere.

install.ps1 honors INSTALLED_NAME and moves an existing .exe aside
before installing, since Windows cannot overwrite a running executable.

Also: treat "$" in the invoked name literally when rewriting help text,
strip the ".exe" suffix case-insensitively, and note why the version
line keeps its fixed "flashduty version" prefix.
Name the CLI after the command word it was invoked as
Builds stub release archives locally and serves them through an
Invoke-WebRequest stand-in, then checks the default name, INSTALLED_NAME
in either case, and reinstalling while the installed exe (or its
moved-aside copy) is running, under Windows PowerShell 5.1 and
PowerShell 7.
Each reinstall moved the existing exe to the fixed name <name>.exe.old.
If the copy moved aside by an earlier reinstall was still running, that
file could be neither deleted nor replaced, so the next reinstall failed
with "Cannot create a file when that file already exists". Move the
exe aside under a unique name instead and delete earlier copies that are
no longer running.
Run install.ps1 behavior tests on Windows
@ysyneu
ysyneu merged commit b771674 into main Oct 8, 2026
15 checks passed
@ysyneu
ysyneu deleted the feat/skill-command-name branch October 8, 2026 14:18
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