Conversation
- Fix idempotent sourcing in `lib/security.sh` by guarding readonly variables. - Add `skip_if_not_macos` helper to `tests/test_helper.bash`. - Update macOS-specific tests (`fc_alfred`, `fc_defaults`, `fc_raycast`, `fc_wifi`, `fc_dns`, `fc_firewall`) to skip on Linux. - Implement `os_get_package_manager` in `lib/os/linux.sh` and fix function naming in `lib/plugins/fc-apps`. - Update `lib/plugins/fc-update` to use cross-platform package update functions. - Fix `stat` command usage in `lib/plugins/fc-sync` and various tests (`fc_secrets`, `fc_sync`, `fc_vscode_sync`) to be OS-aware. - Prevent SIGPIPE errors in `lib/plugins/fc-apps` pipelines. - Correct test expectations in `tests/fc_apps.bats` and `tests/fc_update.bats`. - Remove tests for non-existent `setup` subcommand in `tests/fc_maintenance.bats`. Co-authored-by: southpawriter02 <207498890+southpawriter02@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR addresses test failures on non-macOS environments (Linux) by handling macOS-specific commands and syntax.
Changes include:
Library Fixes:
lib/security.shidempotent to prevent "readonly variable" errors when sourced multiple times.os_get_package_managertolib/os/linux.sh.lib/plugins/fc-appsandlib/plugins/fc-updateto use cross-platform package management functions instead of hardcoded Homebrew checks.statusage inlib/plugins/fc-syncto support both macOS (-f %Lp) and Linux (-c %a).|| trueto pipelines inlib/plugins/fc-appsto avoid SIGPIPE withset -eo pipefail.Test Updates:
skip_if_not_macoshelper.fc_alfred.bats,fc_defaults.bats,fc_raycast.bats,fc_wifi.bats,fc_dns.bats, andfc_firewall.batsto skip tests on Linux.fc_update.batsto expect "System Packages" on Linux instead of "Homebrew".statcommand usage infc_secrets.bats,fc_sync.bats, andfc_vscode_sync.bats.fc_apps.bats.fc_maintenance.bats.These changes ensure that the test suite runs correctly on both macOS and Linux environments.
PR created automatically by Jules for task 13458119408557265821 started by @southpawriter02