Skip to content

Commit dd35f62

Browse files
committed
Merge pull request #551 from mousetraps/i550
#550 error during build when tf cmdlet doesn't exist
2 parents b801b60 + 3960d83 commit dd35f62

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Nodejs/Setup/BuildRelease.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ if ($name) {
323323
$version_file_backed_up = 0
324324
# Force use of a backup if there are pending changes to $version_file
325325
$version_file_force_backup = 0
326-
$has_tf_workspace = (-not (tf workspaces | Select-String -pattern "No workspace", "Unable to determine the workspace"))
326+
$has_tf_workspace = (Get-Command tf -errorAction SilentlyContinue) -and (-not (tf workspaces | Select-String -pattern "No workspace", "Unable to determine the workspace"))
327327
if ($has_tf_workspace) {
328328
if (-not (tf status $version_file /format:detailed | Select-String "There are no pending changes.")) {
329329
Write-Output "$version_file has pending changes. Using backup instead of tf undo."

0 commit comments

Comments
 (0)