Skip to content

Conversation

@TheCodeLamp
Copy link
Contributor

When starting a new shell session inside a rust folder you'd get this error:

image

This pr fixes this issue.

Entering a folder without having a previous folder happen when you for example start a new terminal or starts a multiplexer already inside that folder.

@TheCodeLamp TheCodeLamp changed the title Fixed entering into rust folder Fixed rusty-paths.nu entering into rust folder May 5, 2025
@Bahex
Copy link
Member

Bahex commented May 5, 2025

I think it makes more sense to just return early when $before == null, as there is no reason for the second hook to run on startup.

@TheCodeLamp
Copy link
Contributor Author

Yes, you are correct. I'll fix this by just adding and ($before | is-not-empty) to the end of the condition.

@TheCodeLamp
Copy link
Contributor Author

Is this better?

@fdncred fdncred merged commit 4ecbb0e into nushell:main May 5, 2025
1 check passed
@fdncred
Copy link
Contributor

fdncred commented May 5, 2025

Thanks

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.

3 participants