Closed sweep-ai[bot] closed 8 months ago
fluere-config/src/init.rs
✗
Sandbox logs for
trunk fmt fluere-config/src/init.rs || exit 0
1/2 ✓Checked 1 file ✔ No issues
trunk check --fix --print-failures fluere-config/src/init.rs
2/2 ❌ (`1`)FAILURES clippy fluere-config .trunk/out/La6ok.yaml NOTICES A tool failed to run. You can open the details yaml file for more information. Checked 1 file ✖ No issues, 1 failure # .trunk/out/La6ok.yaml trunk_cli_version: 1.17.1 title: "Error while executing: fluere-config" report: - Unable to find fluere-config for Cargo.lock in any parent directory of /repo/fluere-config - linter: command: | /root/.cache/trunk/tools/rust/1.65.0-f09848e9e4f55504aac7f8b8e2f48445/bin/cargo clippy --message-format json --locked -- --cap-lints=warn --no-deps stdin_path: (none) run_from: /repo/fluere-config timeout: 10m rerun: (cd /repo/fluere-config; env -i PATH=/root/.cache/trunk/tools/rust/1.65.0-f09848e9e4f55504aac7f8b8e2f48445/bin:/root/.nvm/versions/node/v18.17.0/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin CARGO_HOME=/root/.cache/trunk/repos/f97b771eaa16b34ad180abf83b26f9a7/results/clippy-current/cargo_home CARGO_TARGET_DIR=/root/.cache/trunk/repos/f97b771eaa16b34ad180abf83b26f9a7/results/clippy-current/cargo_target_dir HOME=/root /root/.cache/trunk/tools/rust/1.65.0-f09848e9e4f55504aac7f8b8e2f48445/bin/cargo clippy --message-format json --locked -- --cap-lints=warn --no-deps) affects_cache: - Cargo.toml direct_configs: [] exit_status: exited exit_code: 101 stdout: (none) stderr: | Updating crates.io index Updating git repository `https://github.com/SkuldNorniern/pcap` error: the lock file /repo/Cargo.lock needs to be updated but --locked was passed to prevent this If you want to try to generate the lock file without accessing the network, remove the --locked flag and use --offline instead. parser: | (none)
repo/Cargo.lock
✓
Sandbox logs for
trunk fmt repo/Cargo.lock || exit 0
1/2 ✓Found no applicable linters for the requested path
trunk check --fix --print-failures repo/Cargo.lock
2/2 ✓NOTICES repo/Cargo.lock ignored by .gitignore and trunk.yaml [git-diff-check] Hint: use --force to check ignored files Found no applicable linters for the requested path
CI/CD configuration file
✗
Sandbox logs for
trunk fmt CI/CD configuration file || exit 0
1/2 ✓✖ 'CI/CD' does not exist
trunk check --fix --print-failures CI/CD configuration file
2/2 ❌ (`1`)✖ 'CI/CD' does not exist
CI/CD configuration file
✗
Sandbox logs for
trunk fmt CI/CD configuration file || exit 0
1/2 ✓✖ 'CI/CD' does not exist
trunk check --fix --print-failures CI/CD configuration file
2/2 ❌ (`1`)✖ 'CI/CD' does not exist
.github/workflows/ci.yml
✗
Sandbox logs for
trunk fmt .github/workflows/ci.yml || exit 0
1/2 ✓✔ Formatted .github/workflows/ci.yml Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix --print-failures .github/workflows/ci.yml
2/2 ❌ (`1`)ISSUES .github/workflows/ci.yml:1:1 1:1 high Ensure top-level permissions are not set to write-all checkov/CKV2_GHA_1 Checked 1 file ✖ 1 new issue
.github/workflows/ci.yml
✓
Sandbox logs for https://github.com/SkuldNorniern/fluere/commit/da54b38944114c61679eb6509c15d16de36380bf
trunk fmt .github/workflows/ci.yml || exit 0
1/2 ✓✔ Formatted .github/workflows/ci.yml Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix --print-failures .github/workflows/ci.yml
2/2 ✓Checked 1 file ✔ No issues
.github/workflows/ci.yml
✓
Sandbox logs for
trunk fmt .github/workflows/ci.yml || exit 0
1/2 ✓Checked 1 file ✔ No issues
trunk check --fix --print-failures .github/workflows/ci.yml
2/2 ✓Checked 1 file ✔ No issues
CI/CD configuration file
✗
Sandbox logs for
trunk fmt CI/CD configuration file || exit 0
1/2 ✓✖ 'CI/CD' does not exist
trunk check --fix --print-failures CI/CD configuration file
2/2 ❌ (`1`)✖ 'CI/CD' does not exist
.github/workflows/ci.yml
✓
Sandbox logs for
trunk fmt .github/workflows/ci.yml || exit 0
1/2 ✓Checked 1 file ✔ No issues
trunk check --fix --print-failures .github/workflows/ci.yml
2/2 ✓Checked 1 file ✔ No issues
CI/CD configuration file
✗
Sandbox logs for
trunk fmt CI/CD configuration file || exit 0
1/2 ✓✖ 'CI/CD' does not exist
trunk check --fix --print-failures CI/CD configuration file
2/2 ❌ (`1`)✖ 'CI/CD' does not exist
[X] Check .github/workflows/ci.yml
✗
Run `.github/workflows/ci.yml` through the sandbox.
[X] Check CI/CD configuration file
✗
Sandbox logs for
trunk fmt CI/CD configuration file || exit 0
1/2 ✓✖ 'CI/CD' does not exist
trunk check --fix --print-failures CI/CD configuration file
2/2 ❌ (`1`)✖ 'CI/CD' does not exist
CI/CD configuration file
▶
Sandbox logs for
trunk fmt CI/CD configuration file || exit 0
1/2 ✓✖ 'CI/CD' does not exist
trunk check --fix --print-failures CI/CD configuration file
2/2 ❌ (`1`)✖ 'CI/CD' does not exist
fluere-config/src/init.rs
▶
Sandbox logs for
trunk fmt fluere-config/src/init.rs || exit 0
1/2 ✓Checked 1 file ✔ No issues
trunk check --fix --print-failures fluere-config/src/init.rs
2/2 ❌ (`1`)FAILURES clippy fluere-config .trunk/out/La6ok.yaml NOTICES A tool failed to run. You can open the details yaml file for more information. Checked 1 file ✖ No issues, 1 failure # .trunk/out/La6ok.yaml trunk_cli_version: 1.17.1 title: "Error while executing: fluere-config" report: - Unable to find fluere-config for Cargo.lock in any parent directory of /repo/fluere-config - linter: command: | /root/.cache/trunk/tools/rust/1.65.0-f09848e9e4f55504aac7f8b8e2f48445/bin/cargo clippy --message-format json --locked -- --cap-lints=warn --no-deps stdin_path: (none) run_from: /repo/fluere-config timeout: 10m rerun: (cd /repo/fluere-config; env -i PATH=/root/.cache/trunk/tools/rust/1.65.0-f09848e9e4f55504aac7f8b8e2f48445/bin:/root/.nvm/versions/node/v18.17.0/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin CARGO_HOME=/root/.cache/trunk/repos/f97b771eaa16b34ad180abf83b26f9a7/results/clippy-current/cargo_home CARGO_TARGET_DIR=/root/.cache/trunk/repos/f97b771eaa16b34ad180abf83b26f9a7/results/clippy-current/cargo_target_dir HOME=/root /root/.cache/trunk/tools/rust/1.65.0-f09848e9e4f55504aac7f8b8e2f48445/bin/cargo clippy --message-format json --locked -- --cap-lints=warn --no-deps) affects_cache: - Cargo.toml direct_configs: [] exit_status: exited exit_code: 101 stdout: (none) stderr: | Updating crates.io index Updating git repository `https://github.com/SkuldNorniern/pcap` error: the lock file /repo/Cargo.lock needs to be updated but --locked was passed to prevent this If you want to try to generate the lock file without accessing the network, remove the --locked flag and use --offline instead. parser: | (none)
[!IMPORTANT]
Auto Review Skipped
Bot user detected.
To trigger a single review, invoke the
@coderabbitai review
command.
when the config file is not found, automatically create the config file
Done.
on the path, the user name appears twice, fix the issue
path_file: "/Users/<user>/<user>/.config/fluere/fluere.toml"
Done.
on linux, there is no user name on the config, but on the macOS side, it it fixed use the derive to fix that per OS
Done.
PR Feedback: 👎
Description
This PR fixes the issue where directory creation fails on macOS due to an incorrect assumption about the home directory path. The problem occurs when the application tries to create a directory at "/home//.config/fluere", which is not valid on macOS. The fix involves modifying the
home_config_path
function in theinit.rs
file to correctly construct the home directory path using thedirs::home_dir
function from thedirs
crate.Summary of Changes
home_dir
function from thedirs
crate.home_config_path
function to construct the home directory path correctly using thehome_dir
function.Please review and merge this PR to resolve the directory creation failure on macOS.
Fixes #74.
🎉 Latest improvements to Sweep:
rope
library to refactor Python! Check out Large Language Models are Bad at Refactoring Code. To have Sweep refactor your code, trysweep: Refactor <your_file>.py to be more modular
!💡 To get Sweep to edit this pull request, you can: