Skip to content

Conversation

@krzysdabro
Copy link

@krzysdabro krzysdabro commented Nov 7, 2025

Description

This change fixes an issue with syncing environment file values that contain slashes.

Previously, sed would throw the following errors when attempting to update these values:

Updating CORS_ALLOWED_ORIGINS with "http://${APP_DOMAIN}"
sed: -e expression #1, char 55: unknown option to `s'
Updating API_BASE_URL with "http://api:8000"
sed: -e expression #1, char 39: unknown option to `s'

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Test Scenarios

Apply changes to setup.sh and use it to upgrade the application. Environment variables containing slashes, such as DATABASE_URL and AWS_S3_ENDPOINT_URL, should sync correctly.

References

Closes #8011


Note

Escapes / in environment variable values when updating plane.env on non-macOS to prevent sed substitution errors.

  • CLI install script (deployments/cli/community/install.sh):
    • Update updateEnvFile for non-macOS: pre-escape / in value before sed -i substitution to avoid delimiter errors when syncing env vars.

Written by Cursor Bugbot for commit 561229c. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed installation script to properly handle environment variable values containing forward slashes on macOS.

Copilot AI review requested due to automatic review settings November 7, 2025 18:44
@CLAassistant
Copy link

CLAassistant commented Nov 7, 2025

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 7, 2025

Walkthrough

The installation script for macOS now escapes forward slashes in environment variable values before executing sed in-place replacements. This change prevents sed delimiter conflicts when values contain forward slash characters.

Changes

Cohort / File(s) Summary
macOS environment variable handling
deployments/cli/community/install.sh
Added forward slash escaping for environment variable values during Darwin sed replacement operations to prevent delimiter conflicts

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify the escaping mechanism correctly handles forward slashes without over-escaping or missing edge cases
  • Confirm the sed replacement logic remains unchanged in all other aspects

Poem

🐰 A slash here, a slash there,
Escaped with care in the shell's affair,
Sed's delimiter now plays fair,
Darwin's paths flow without despair,
Config installs with utmost care! 🚀

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: escaping slashes in environment variable values during update operations.
Description check ✅ Passed The PR description follows the template and includes all required sections: clear problem description with error examples, Type of Change marked as Bug fix, test scenarios described, and issue reference (#8011).
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

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 fixes environment variable updates on Linux systems by properly escaping forward slashes in values before they're used in sed substitution commands.

  • Adds forward slash escaping for Linux/non-macOS systems to prevent sed command failures when values contain forward slashes (e.g., URLs like "artifacts.plane.so/makeplane")

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: Variabe value gets reset to default on Upgrade

2 participants