Skip to content

Implement a dnst version check#180

Merged
mozzieongit merged 4 commits intomainfrom
keyset-version-check
Oct 14, 2025
Merged

Implement a dnst version check#180
mozzieongit merged 4 commits intomainfrom
keyset-version-check

Conversation

@mozzieongit
Copy link
Member

Uses string splitting to avoid including a new dependency on regex.

  • Checking that the dnst binary is available
  • Checking that the keyset subcommand is available
  • Checking the version number (but currently ignoring any -alpha/-rcX suffixes)

Example output:

$ cascaded --config config.toml --state state.db --log-level trace
...
[2025-10-09T10:12:05.449Z] DEBUG cascaded: Checking dnst binary version ('dnst')       # yes, I have the dnst binary from the keyset branch in my PATH
[2025-10-09T10:12:05.452Z] DEBUG cascaded: Checking dnst keyset subcommand capability
[2025-10-09T10:12:05.454Z] DEBUG cascaded: Checking dnst version string '0.1.0'
[2025-10-09T10:12:05.454Z] INFO cascaded: Using dnst binary 'dnst' with name 'dnst' and version '0.1.0'

$ cascaded --config config.toml --state state.db --log-level trace
...
[2025-10-09T10:07:59.533Z] DEBUG cascaded: Checking dnst binary version ('/tmp/version.sh')
[2025-10-09T10:07:59.535Z] DEBUG cascaded: Checking dnst keyset subcommand capability
[2025-10-09T10:07:59.537Z] DEBUG cascaded: Checking dnst version string '0.1.2'
[2025-10-09T10:07:59.537Z] INFO cascaded: Using dnst binary '/tmp/version.sh' with name 'not-dnst' and version '0.1.2'

$ cascaded --config config.toml --state state.db --log-level trace
...
[2025-10-09T10:08:07.737Z] DEBUG cascaded: Checking dnst binary version ('/tmp/version.sh')
[2025-10-09T10:08:07.738Z] DEBUG cascaded: Checking dnst keyset subcommand capability
[2025-10-09T10:08:07.741Z] DEBUG cascaded: Checking dnst version string '0.0.2'
[2025-10-09T10:08:07.741Z] ERROR cascaded: Configured dnst binary '/tmp/version.sh' version (0.0.2) is unsupported. Expected >0.1.0

Fixes: #158

@mozzieongit mozzieongit requested a review from a team October 9, 2025 10:16
@mozzieongit mozzieongit self-assigned this Oct 9, 2025
@mozzieongit mozzieongit added the enhancement New feature or request label Oct 9, 2025
Copy link
Member

@ximon18 ximon18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with one minor comment.

@ximon18 ximon18 added this to the 0.1.0-alpha2 milestone Oct 13, 2025
@mozzieongit mozzieongit merged commit c36d8ae into main Oct 14, 2025
27 checks passed
@mozzieongit mozzieongit deleted the keyset-version-check branch October 14, 2025 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When dnst is missing, the error message is confusing

2 participants