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

When PEBBLE_PHONE env. var is set in .bash_profile, pebble install --emulator basalt still connects to PEBBLE_PHONE ip address #43

Open
tkafka opened this issue Sep 5, 2016 · 2 comments

Comments

@tkafka
Copy link

tkafka commented Sep 5, 2016

See https://forums.pebble.com/t/since-sdk4-0-i-cant-run-emulator-again-once-it-has-quit/23792/2

$ cat ~/.bash_profile

...
export PEBBLE_PHONE=192.168.0.12
...

$ pebble logs --emulator aplite

Connecting to ws://192.168.0.12:9000/ ... (instead of localhost:xxxxx)
(logging in libpebble2/communication/transports/websocket/init.py constructor)

This is a regression from 3.x where the same setup worked fine for me.
Two evenings of my life gone :(.

@tkafka
Copy link
Author

tkafka commented Sep 5, 2016

Update: this happens only when export PEBBLE_PHONE="192.168.0.12" is in my .bash_profile, when I just run PEBBLE_PHONE="192.168.0.12" in my bash shell, pebble-tool works ok.

Is it possible that pebble-tool spawns a new environment when running the emulator and then prefers it to the command line parameter?

@tkafka tkafka changed the title When PEBBLE_PHONE env. var is set, pebble install --emulator basalt still connects to PEBBLE_PHONE ip address When PEBBLE_PHONE env. var is set in .bash_profile, pebble install --emulator basalt still connects to PEBBLE_PHONE ip address Sep 5, 2016
@Katharine
Copy link
Contributor

Katharine commented Sep 9, 2016

This isn't an environment issue; a connection handling refactor inadvertently changed how options are prioritised such that the phone environment variable beats the emulator option.

All subprocesses ignore environment variables, and so would not be affected by the state of the environment.

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