nushell / nu_scripts

A place to share Nushell scripts with each other
MIT License
746 stars 228 forks source link

Fixed sys usage #916

Closed lizclipse closed 3 months ago

lizclipse commented 3 months ago

Just as a heads up, I haven't really tested this since a lot of it is stuff I don't use or know how to set up without some reading up. I have tested the nu_conda_2 change since I have a python project that I use that for, and I could look into testing more of it if needed.

I've tried finding (naively using /sys\W/) all the usage of the old plain sys calls and replacing them with alternates as appropriate, which mostly has been to swap a (sys).host.name call into a $nu.os-info.name one, since it'll be tad faster and more consistent across platforms with naming (especially as the value comes from the rust stdlib and is very predictable).

Fixes #897

lizclipse commented 3 months ago

That build error is on something I haven't changed and I have no idea why it's not working. The referenced module does exist, but nu seems to be plugging its ears and going 'lalalalala'. Changing to a use, prefixing the path with ./, or removing the .nu suffix all doesn't help.

fdncred commented 3 months ago

I'm not worried about the ci. it works about 25% of the time. this one is failing because the script assumes the folder is in NU_LIB_DIRS, which it isn't in CI.

The rest of this looks good. Thanks!