-
Notifications
You must be signed in to change notification settings - Fork 26
feat: Create a Nushell script for 'files' module #382
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
base: main
Are you sure you want to change the base?
Conversation
eae8233 to
26467d3
Compare
|
Nice! Are we planning to write all modules in Nushell going forward? Should probably discuss. If and since the |
I figured I'd version it mostly cause I wanted to drop the old schema in favor of only the |
26467d3 to
e0b1809
Compare
Oh yeah, I didn't notice that. Sounds good. That means we have to announce this change, so we better bundle it with #336. Also, versioned modules need separate README's for each version. Feel free to look at what's happening with the default-flatpaks PR. |
e0b1809 to
395cda2
Compare
|
I wonder if there's a way to avoid breaking everyone's builds unexplainably when this is merged... Maybe do the same thing as Or maybe we should just implement support for the old schema completely, but print a deprecation notice when using it. Would that hurt? |
|
There are no special advantages to Nushell Build-time modules like this are pretty simple & For example, maybe it would be useful to add removing files/folders feature in this new module:
That should be done imo, like we do with |
|
In my opinion, the better error messages are a great feature, though I doubt many people are having issues with this module. So, maybe we can actually keep this PR open, not spend Quick ideas: type: files@v2
copy:
- source: system
destination: /
remove:
- /etc/profile.d/ublue-os-just.sh
create:
- destination: /etc/profile.d/gtk-theme.sh
content: GTK_THEME=adw-gtk3Possible other stuff: setting file permission bits, ? |
|
These new features sound like they would be useful |
|
Since Given that this is in Nushell, I think that we can update this a bit if needed, merge this and implement new features later if desired. And of course, notify users about it. I'll make an issue on this. Edit: |
|
I nearly forgot about this pull request |
So from testing out errors, I've found that putting
boolchecks into a variable makes it so that we can take the span of theboolvariable so that when we run into an error, we can supply that span to the error. This makes it easier for users to see how the check is happening.Example of one of the error messages: