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

Add correct path from data-dir #14894

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

NotTheDr01ds
Copy link
Contributor

Description

Fix issue in #14879 with incorrect subdirectory.

User-Facing Changes

None: #14879 will now work as documented.

Tests + Formatting

  • 🟢 toolkit fmt
  • 🟢 toolkit clippy
  • 🟢 toolkit test
  • 🟢 toolkit test stdlib

After Submitting

N/A

Copy link
Member

@sholderbach sholderbach left a comment

Choose a reason for hiding this comment

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

Do we have a test for this autoload part? I hope we could catch that regression next time

@NotTheDr01ds NotTheDr01ds merged commit befedda into nushell:main Jan 22, 2025
15 checks passed
@github-actions github-actions bot added this to the v0.102.0 milestone Jan 22, 2025
@NotTheDr01ds
Copy link
Contributor Author

NotTheDr01ds commented Jan 22, 2025

Do we have a test for this autoload part?

Worse, we don't have testing for any autoload code that has been put in over the last 8 months or so.

Sadly (frustratingly), there's just (AFAICT) no way to do it unless Playground is substantially changed to sandbox a completely separate $nu.data-dir and $nu.default-config-dir. Today (IIRC, working on what I saw last month when I checked) it simply passes in --config <file> when testing something configuration related.

Without sandboxing it properly, any attempt to create an autoload file "leaks" out of Playground into the filesystem of any user who is running the tests.

I'm still noodling through Playground, but it would be a while before I'm up to speed enough on that code to make the change myself. If someone has better experience there, I'd love it if they could take a look.

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