mirror of
https://github.com/esphome/esphome.git
synced 2025-01-31 02:00:55 +00:00
update script/setup so it works fine on windows (#6087)
This commit is contained in:
parent
83baa24022
commit
e39099137d
@ -4,10 +4,13 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
location="venv/bin/activate"
|
||||||
if [ ! -n "$DEVCONTAINER" ] && [ ! -n "$VIRTUAL_ENV" ] && [ ! "$ESPHOME_NO_VENV" ]; then
|
if [ ! -n "$DEVCONTAINER" ] && [ ! -n "$VIRTUAL_ENV" ] && [ ! "$ESPHOME_NO_VENV" ]; then
|
||||||
python3 -m venv venv
|
python3 -m venv venv
|
||||||
source venv/bin/activate
|
if [ -f venv/Scripts/activate ]; then
|
||||||
|
location="venv/Scripts/activate"
|
||||||
|
fi
|
||||||
|
source $location;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Avoid unsafe git error when running inside devcontainer
|
# Avoid unsafe git error when running inside devcontainer
|
||||||
@ -25,4 +28,4 @@ script/platformio_install_deps.py platformio.ini --libraries --tools --platforms
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo "Virtual environment created; source venv/bin/activate to use it"
|
echo "Virtual environment created. Run 'source $location' to use it."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user