Checklist
Area
Topgrade in general
Erroneous behavior
trent@hades:~$ topgrade -v --edit-config
DEBUG Current system locale is en-US
DEBUG No additional configuration directory exists, skipping
DEBUG No configuration exists
DEBUG Unable to write the example configuration file to /home/trent/.config/topgrade.toml: No such file or directory (os error 2). Using blank config.
Error:
0: No such file or directory (os error 2)
Location:
src/config.rs:663
Expected behavior
trent@hades:~$ topgrade -v --edit-config
DEBUG Current system locale is en-US
DEBUG No additional configuration directory exists, skipping
DEBUG No configuration exists
<text editor choice prompt>
Steps to reproduce
rm -rf /tmp/tg-repro
XDG_CONFIG_HOME=/tmp/tg-repro/config topgrade -v --edit-config
Problem persists when running command outside of Topgrade
None
Possible cause
ConfigFile::ensure() writes the file without creating its parent directory; Config::load guards this exact condition with if config_directory.is_dir(), but --edit-config returns early in main.rs and calls ConfigFile::edit() → ensure() directly, bypassing that guard.
Ran through Remote Execution?
No
Topgrade version
topgrade 17.9.0
Last working version
No response
Environment
OS: Ubuntu Server 26.04.1 LTS (GNU/Linux 7.0.0-29-generic x86_64)
Topgrade installed from the official .deb release asset. It's a system-wide install at /usr/bin/topgrade. The machine had no ~/.config directory at all
Configuration file
There is no config file
Verbose output
Verbose output
trent@hades:~$ XDG_CONFIG_HOME=/tmp/tg-repro/config topgrade -v --edit-config
DEBUG Current system locale is en-US
DEBUG No additional configuration directory exists, skipping
DEBUG No configuration exists
DEBUG Unable to write the example configuration file to /tmp/tg-repro/config/topgrade.toml: No such file or directory (os error 2). Using blank config.
Error:
0: No such file or directory (os error 2)
Location:
src/config.rs:663
Contribution
Checklist
Area
Topgrade in general
Erroneous behavior
Expected behavior
Steps to reproduce
Problem persists when running command outside of Topgrade
None
Possible cause
ConfigFile::ensure()writes the file without creating its parent directory;Config::loadguards this exact condition withif config_directory.is_dir(), but--edit-configreturns early inmain.rsand callsConfigFile::edit()→ensure()directly, bypassing that guard.Ran through Remote Execution?
No
Topgrade version
topgrade 17.9.0
Last working version
No response
Environment
OS: Ubuntu Server 26.04.1 LTS (GNU/Linux 7.0.0-29-generic x86_64)
Topgrade installed from the official .deb release asset. It's a system-wide install at /usr/bin/topgrade. The machine had no ~/.config directory at all
Configuration file
There is no config file
Verbose output
Verbose output
Contribution