Skip to content

150 add a bash script or something for install purpose#156

Merged
LuernOutOfOrder merged 4 commits intodevelopfrom
150-add-a-bash-script-or-something-for-install-purpose
Jun 30, 2025
Merged

150 add a bash script or something for install purpose#156
LuernOutOfOrder merged 4 commits intodevelopfrom
150-add-a-bash-script-or-something-for-install-purpose

Conversation

@LuernOutOfOrder
Copy link
Owner

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 for rustc and cargo, updating environment variables, and running build and installation commands.

Configuration updates:

  • src/nxfs/config.rs: Updated the configuration template to change the version from 0.4.0 to 0.4.1.
  • src/nxfs/config.rs: Changed the default value of secure_mode in the configuration template from false to true to enhance security.
  • src/nxfs/config.rs: Moved the change_work_dir function call from config_command to init_config for better initialization flow.

Miscellaneous:

  • .cargo/config.toml: Added new shortcuts (i for installation and rr for running with release) and fixed a typo in a comment.

@LuernOutOfOrder LuernOutOfOrder added this to the v3.0.0 milestone Jun 30, 2025
@LuernOutOfOrder LuernOutOfOrder requested a review from Copilot June 30, 2025 11:34
@LuernOutOfOrder LuernOutOfOrder self-assigned this Jun 30, 2025
@LuernOutOfOrder LuernOutOfOrder added bug Something isn't working enhancement New feature or request labels Jun 30, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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
Copy link

Copilot AI Jun 30, 2025

Choose a reason for hiding this comment

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

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

Copilot uses AI. Check for mistakes.
exit 1
fi

echo export PATH=$PATH:~/.cargo/bin/ >> "$CONFIG_FILE"
Copy link

Copilot AI Jun 30, 2025

Choose a reason for hiding this comment

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

[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"

Copilot uses AI. Check for mistakes.
@LuernOutOfOrder LuernOutOfOrder merged commit f296a71 into develop Jun 30, 2025
1 check passed
@LuernOutOfOrder LuernOutOfOrder deleted the 150-add-a-bash-script-or-something-for-install-purpose branch June 30, 2025 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants