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

CLI arg splitting regression between v4.0.0 and v4.1.0 on macOS #1363

Open
d3v-null opened this issue Mar 15, 2024 · 3 comments
Open

CLI arg splitting regression between v4.0.0 and v4.1.0 on macOS #1363

d3v-null opened this issue Mar 15, 2024 · 3 comments
Assignees

Comments

@d3v-null
Copy link

d3v-null commented Mar 15, 2024

Describe the bug

I prefer to use Carta in Chrome, which is not my default browser, so I normally launch carta like this --browser='open -a Google\ Chrome'

This previously worked fine in version 4.0.0 (which I installed through homebrew), but something has changed in 4.1.0, so I get this error now.

> carta --browser='open -a Google\ Chrome'
CARTA will use the default ephemerides and geodetic data.
[2024-03-15 13:37:43.028] [critical] Option ‘a’ does not exist

It seems like the -a in the browser command is being interpreted as a command line argument for Carta.

It doesn't like this either

carta --browser='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome'
The application /Applications/Google http://localhost:3002/?token=9CE04BBD-F58E-45F9-9288-306B7F8ADDD1 cannot be opened for an unexpected reason, error=Error Domain=NSCocoaErrorDomain Code=260 "The file “?token=9CE04BBD-F58E-45F9-9288-306B7F8ADDD1” couldn’t be opened because there is no such file." UserInfo={NSURL=file:///Applications/Google%20http://localhost:3002/%3Ftoken=9CE04BBD-F58E-45F9-9288-306B7F8ADDD1, NSFilePath=/Applications/Google http://localhost:3002/?token=9CE04BBD-F58E-45F9-9288-306B7F8ADDD1, NSUnderlyingError=0x600002800450 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[2024-03-15 06:17:20.831Z] [CARTA] [warning] WebBrowser: Failed to open the browser automatically.

To Reproduce
on macOS sierra, carta v4.1.0

carta --browser='open -a "Google Chrome"'

Expected behavior
Should open Carta in Chrome like it did on v4.0.0

Platform info (please complete the following information):

Additional context
Maybe the meaning of the --browser argument has changed, but if whatever is wrapping carta is not splitting shell arguments correctly, that's probably indicative of a more serious issue.

Thanks!

@kswang1029
Copy link
Contributor

What happened if you just do carta without the browser flag?

@d3v-null
Copy link
Author

it opens the carta url in my default browser (firefox)

some more info on what gets installed by brew:

/opt/homebrew/bin/carta looks like this:

#!/bin/bash
/opt/homebrew/Caskroom/CARTA.app/Contents/Resources/app/carta-backend/bin/carta.sh "$@"

/opt/homebrew/Caskroom/CARTA.app/Contents/Resources/app/carta-backend/bin/carta.sh

#!/bin/bash

dirname=`dirname $0`

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )/../etc"

export CASAPATH="../../../../$DIR linux"

$dirname/casa_data_autoupdate

$dirname/carta_backend $@ --frontend_folder=$dirname/../../

@d3v-null
Copy link
Author

I might just add that this may be more of an issue with https://github.com/CARTAvis/homebrew-tap/ rather than carta-backend, since the packaging has changed recently, and I don't get the warning on 4.1.0 on linux.

carta --browser 'curl -a'

should I move this issue over to that repo instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: New issues/PRs
Development

No branches or pull requests

3 participants