From 4e9ae399b748044a6adcf14e0813f7bdd8066dc2 Mon Sep 17 00:00:00 2001 From: TudorAndrei Date: Wed, 29 Oct 2025 13:53:32 +0200 Subject: [PATCH] Update Cursor to version 1.7.54 and enhance update-cursor.sh for improved output handling - Updated Cursor version, URL, and SHA256 in flake.nix - Refined output handling in update-cursor.sh to check for GITHUB_OUTPUT before writing status information --- update-cursor.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/update-cursor.sh b/update-cursor.sh index 2cf913f..080460b 100755 --- a/update-cursor.sh +++ b/update-cursor.sh @@ -103,12 +103,16 @@ main() { # Check if update is needed if [[ "$target_version" == "$current_version" ]]; then echo "No update needed. Current version is up to date." - echo "CURSOR_VERSION_INFO=no_update" >> "$GITHUB_OUTPUT" 2>/dev/null || true + if [[ -n "${GITHUB_OUTPUT:-}" ]]; then + echo "CURSOR_VERSION_INFO=no_update" >> "$GITHUB_OUTPUT" + fi exit 0 fi echo "Update needed: $current_version -> $target_version" - echo "CURSOR_VERSION_INFO=updated:$current_version:$target_version" >> "$GITHUB_OUTPUT" 2>/dev/null || true + if [[ -n "${GITHUB_OUTPUT:-}" ]]; then + echo "CURSOR_VERSION_INFO=updated:$current_version:$target_version" >> "$GITHUB_OUTPUT" + fi # Check if running in CI/GitHub Actions (auto-confirm) if [[ -n "${CI:-}" ]] || [[ -n "${GITHUB_ACTIONS:-}" ]]; then @@ -123,7 +127,9 @@ main() { update_flake "$target_version" test_flake echo "Update completed successfully!" - echo "CURSOR_VERSION_INFO=completed:$current_version:$target_version" >> "$GITHUB_OUTPUT" 2>/dev/null || true + if [[ -n "${GITHUB_OUTPUT:-}" ]]; then + echo "CURSOR_VERSION_INFO=completed:$current_version:$target_version" >> "$GITHUB_OUTPUT" + fi echo "You can now commit the changes:" echo " git add flake.nix" echo " git commit -m \"Update Cursor to version $target_version\""