Skip to content

Config wizard fails to create config file when started with --config-wizard on Windows #70

@unclesp1d3r

Description

@unclesp1d3r

There appears to be a second, related issue on Windows when launching the configuration wizard directly via the command-line flag, rather than letting pvetui create the default config first.

When running pvetui 1.0.15 on Windows with the --config-wizard flag, the interactive configuration wizard allows all fields to be filled out but fails when saving. The tool creates the pvetui configuration directory, but no configuration file is written.

Steps to reproduce

  1. Install pvetui 1.0.15 on Windows using Scoop.

  2. Open PowerShell and run:

    pvetui --config-wizard
  3. Fill in the configuration form, including valid authentication details (password or token).

  4. Select Save.

  5. Observe the error dialog:

    Failed to save config: open: The system cannot find the file specified.

Expected behavior

The configuration wizard should create a new configuration file and save the provided settings successfully.

Actual behavior

  • The pvetui configuration directory is created.
  • No configuration file is written.
  • The save operation fails with the error above.

Environment

  • OS: Windows 11
  • Installation method: Scoop
  • Version: pvetui 1.0.15

Additional notes (hypothesis)

My guess is that, in this code path, the wizard attempts to open an existing config file for writing rather than creating a new one if it does not already exist. This would explain why the directory is created but the save fails when no config file is present.

Happy to test a fix or provide additional debugging output if needed.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions