Bug Description
On Windows, the -o parameter does not correctly expand the tilde (~) character to the user's home directory. Instead, it treats ~ as a literal directory name.
Environment
- OS: Windows
- openskills version: 1.5.0
Steps to Reproduce
- Open a terminal on Windows
- Run:
npx openskills sync -o ~/.config/opencode/AGENTS.md
Expected Behavior
The file should be written to:
C:\Users\<username>\.config\opencode\AGENTS.md
Actual Behavior
The file is created at:
<CurrentPath>\~\.config\opencode\AGENTS.md
The ~ is not expanded to the user's home directory and is instead treated as a literal directory name in the current working directory.
Possible Solution
The path expansion logic should handle the tilde (~) character and expand it to the user's home directory (using os.homedir() or similar) before resolving the full path.
Additional Context
This works correctly on Unix-like systems where the shell expands ~ before passing it to the program. However, on Windows, this expansion does not happen automatically, so the application needs to handle it internally.
Bug Description
On Windows, the
-oparameter does not correctly expand the tilde (~) character to the user's home directory. Instead, it treats~as a literal directory name.Environment
Steps to Reproduce
npx openskills sync -o ~/.config/opencode/AGENTS.mdExpected Behavior
The file should be written to:
Actual Behavior
The file is created at:
The
~is not expanded to the user's home directory and is instead treated as a literal directory name in the current working directory.Possible Solution
The path expansion logic should handle the tilde (~) character and expand it to the user's home directory (using
os.homedir()or similar) before resolving the full path.Additional Context
This works correctly on Unix-like systems where the shell expands
~before passing it to the program. However, on Windows, this expansion does not happen automatically, so the application needs to handle it internally.