Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use xdg dir as default cli Path #563

Merged
merged 10 commits into from
Dec 9, 2024
Merged

Conversation

ShawkyZ
Copy link
Contributor

@ShawkyZ ShawkyZ commented Dec 6, 2024

Description

  • Change default CLI download path to use XDG dirs.
  • Migrate existing config for CLI path if it's in extension folder.
  • revert back logic to ensure creation of CLI dir.

Checklist

  • Tests added and all succeed
  • Linted
  • CHANGELOG.md updated
  • README.md updated, if user-facing

Screenshots / GIFs

Visuals that may help the reviewer. Please add screenshots for any UI change. GIFs are most welcome!

@ShawkyZ ShawkyZ marked this pull request as ready for review December 9, 2024 09:12
@ShawkyZ ShawkyZ requested a review from a team as a code owner December 9, 2024 09:12

const path = await this.configuration.getCliPath();
// migration for moving from default extension path to xdg dirs.
if (CliExecutable.isPathInExtensionDirectory(this.extensionContext.extensionPath, path)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this might be unnecessary. But I want to ensure extension doesn't break for current preview users.

await this.configuration.getCliPath(),
);
const cliPath = await this.configuration.getCliPath();
const cliDir = path.dirname(cliPath);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was the old logic that ensure cliDir exists.

@ShawkyZ ShawkyZ merged commit 1b81854 into main Dec 9, 2024
10 checks passed
@ShawkyZ ShawkyZ deleted the fix/cli-download-xdg-dir branch December 9, 2024 11:43
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.

2 participants