Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sail open - "command not found" #743

Closed
rqpt opened this issue Oct 30, 2024 · 2 comments
Closed

sail open - "command not found" #743

rqpt opened this issue Oct 30, 2024 · 2 comments

Comments

@rqpt
Copy link
Contributor

rqpt commented Oct 30, 2024

Sail Version

1.26

Laravel Version

11.30.0

PHP Version

8.3.11

Operating System

Linux

OS Version

Alpine Edge

Description

The sail open command does not work, due to a mysterious dependency on some url open utility that might or might not even exist. Said utility is simply called ... "open" 👀

The offending code is at the veeeeeery bottom of the sail script: (line 560 at the time of writing)

# Open the site...
elif [ "$1" == "open" ]; then
    shift 1

    if [ "$EXEC" == "yes" ]; then

        if [[ -n "$APP_PORT" && "$APP_PORT" != "80" ]]; then
            FULL_URL="${APP_URL}:${APP_PORT}"
        else
            FULL_URL="$APP_URL"
        fi

        open "$FULL_URL"

        exit
    else
        sail_is_not_running
    fi
fi

What is this 'open' executable? I don't have it, and haven't heard of it? It isn't in my package manager. Doubt.

EDIT: It seems open is in fact a thing, lol... just not on linux 😿

I'll try to submit a fix for this hopefully soon, but if someone takes this before me - I think an xdg-open should do.

Steps To Reproduce

  1. Init a new laravel app with sail.
  2. Run sail open
  3. Beyold the mysterious error message: /vendor/laravel/sail/bin/sail: line 572: open: command not found
@devajmeireles
Copy link

Why not submit your code snipped as a PR to fix that instead of only opening an issue?

@rqpt
Copy link
Contributor Author

rqpt commented Oct 31, 2024

Why not submit your code snipped as a PR to fix that instead of only opening an issue?

I was going to, but life happens and your attention is needed elsewhere sometimes.

Also, did you read my closing paragraph? I don't have a fix for this yet. I noticed it's broken and intend to fix it, just not this very second.

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

No branches or pull requests

2 participants