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

Windows install scripts support paths with spaces #2222

Merged
merged 1 commit into from
Oct 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/install/install-windows.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@echo off
PowerShell.exe -ExecutionPolicy Bypass -Command "%~dp0\install-windows.ps1 %*"
PowerShell.exe -ExecutionPolicy Bypass -Command "& '%~dp0/install-windows.ps1' %*"
14 changes: 7 additions & 7 deletions scripts/install/install-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ function confirm-branch() {
function confirm-latest-commit() {
git fetch

$local_commit = [string](git rev-parse HEAD)
$remote_commit = [string](git rev-parse "@{u}")
$local_commit = [string](git rev-parse HEAD)
$remote_commit = [string](git rev-parse "@{u}")

if($local_commit -eq $remote_commit) {
if($local_commit -eq $remote_commit) {
add-success "Branch is up to date."
} else {
} else {
$behind = [string](git rev-list --count $local_commit...$remote_commit)
add-warning "Branch is out of date by $behind commits. Run 'git pull' to update."
}
}
}

function confirm-node-version() {
Expand Down Expand Up @@ -122,8 +122,8 @@ function install-python-dependencies() {
add-failure "Invalid version of python installed. Needs python >= 3.5. You can either have globably available in the path as python, python3 or set the BL_PYTHON_PATH environment variable."
}

Write-Host "$python $root/scripts/install/install-python-dep.py"
cmd /c "$python $root/scripts/install/install-python-dep.py"
Write-Host "$python `"$root/scripts/install/install-python-dep.py`""
cmd /c "$python `"$root/scripts/install/install-python-dep.py`""

if($lastExitCode -eq 0) {
add-success "Installed python dependencies correctly" -foreground "green";
Expand Down