Skip to content

Conversation

@gorkarevilla
Copy link
Contributor

@gorkarevilla gorkarevilla commented Oct 31, 2025

This fix this: https://vonage.slack.com/archives/C02TC4RNZ9Q/p1761236283899269

With permissions:

root@cc64b39b84ea:/# curl -L https://raw.githubusercontent.com/Vonage/cloud-runtime-cli/fix/mac_writting_permissions/script/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4414  100  4414    0     0  20459      0 --:--:-- --:--:-- --:--:-- 20530
######################################################################## 100.0%
vcr was installed successfully to /usr/local/bin/vcr
Run 'vcr --help' to get started

Without permissions, current MacOS in Vonage:

> curl -L https://raw.githubusercontent.com/Vonage/cloud-runtime-cli/fix/mac_writting_permissions/script/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4414  100  4414    0     0  45290      0 --:--:-- --:--:-- --:--:-- 45505
######################################################################## 100.0%
vcr was installed successfully to /Users/gorkarevilla/.local/bin/vcr
Run 'vcr --help' to get started

Not in the PATH:

$ curl -L https://raw.githubusercontent.com/Vonage/cloud-runtime-cli/fix/mac_writting_permissions/script/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4472  100  4472    0     0  20595      0 --:--:-- --:--:-- --:--:-- 20608
######################################################################## 100.0%
vcr was installed successfully to /home/testuser/.local/bin

⚠️  Warning: /home/testuser/.local/bin is not in your $PATH
Add the following to your $HOME/.bash_profile:
  export PATH="/home/testuser/.local/bin:$PATH"

Then you can run: vcr --help
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
$ vcr config
-sh: 4: vcr: not found
$ export PATH="/home/testuser/.local/bin:$PATH"
$ vcr -h
VCR CLI is a powerful command-line interface designed to streamline
and simplify the development and management of applications on 
the Vonage Cloud Runtime platform.

...

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 improves the robustness of the VCR CLI installation script by implementing a fallback mechanism for installation locations. When the system-wide installation to /usr/local/bin fails due to permission issues, the script now attempts to install to user-local directories as alternatives.

  • Enhanced installation logic with graceful fallback to user directories when system-wide installation fails
  • Added user-friendly guidance for PATH configuration when installing to non-standard locations
  • Improved error messages with clearer instructions for resolution

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

@gorkarevilla gorkarevilla merged commit da06414 into main Nov 3, 2025
4 checks passed
@gorkarevilla gorkarevilla deleted the fix/mac_writting_permissions branch November 3, 2025 11:11
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.

4 participants