150 add a bash script or something for install purpose#156
Merged
LuernOutOfOrder merged 4 commits intodevelopfrom Jun 30, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds an installation script to streamline the setup process, updates configuration defaults to improve security, and adjusts the configuration template version.
- Added install.sh to automate Rust environment and project setup
- Updated src/nxfs/config.rs to bump version and turn on secure_mode, and moved the working directory change to init_config
- Modified .cargo/config.toml to add new alias "i" for installation and fixed a comment typo
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/nxfs/config.rs | Updated config template version, secure_mode default, and init flow |
| install.sh | New installation script checking for dependencies and updating PATH |
| .cargo/config.toml | Added a new cargo alias and corrected a comment |
| exit 1 | ||
| fi | ||
|
|
||
| if ! command -V cargo |
There was a problem hiding this comment.
The script uses '-V' to check for cargo, but the correct flag is '-v'. This could cause the check to fail even when cargo is installed.
Suggested change
| if ! command -V cargo | |
| if ! command -v cargo |
| exit 1 | ||
| fi | ||
|
|
||
| echo export PATH=$PATH:~/.cargo/bin/ >> "$CONFIG_FILE" |
There was a problem hiding this comment.
[nitpick] Consider quoting $PATH to ensure that paths with spaces are handled correctly. For example: echo 'export PATH="$PATH:~/.cargo/bin"' >> "$CONFIG_FILE".
Suggested change
| echo export PATH=$PATH:~/.cargo/bin/ >> "$CONFIG_FILE" | |
| echo export PATH="$PATH:~/.cargo/bin/" >> "$CONFIG_FILE" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several changes across multiple files to enhance configuration management, improve installation processes, and update project settings. The most important changes include adding a new installation script, updating configuration defaults for security, and modifying the version in the configuration template.
Installation enhancements:
install.sh: Added a new installation script to automate the setup process, including checking forrustcandcargo, updating environment variables, and running build and installation commands.Configuration updates:
src/nxfs/config.rs: Updated the configuration template to change the version from0.4.0to0.4.1.src/nxfs/config.rs: Changed the default value ofsecure_modein the configuration template fromfalsetotrueto enhance security.src/nxfs/config.rs: Moved thechange_work_dirfunction call fromconfig_commandtoinit_configfor better initialization flow.Miscellaneous:
.cargo/config.toml: Added new shortcuts (ifor installation andrrfor running with release) and fixed a typo in a comment.