Permalink
Browse files

fixed powershell scripts

  • Loading branch information...
1 parent 00781de commit 4c98930091b28089f669eee9748444219938d93d @vertiginous committed Feb 24, 2011
Showing with 10 additions and 4 deletions.
  1. +2 −2 lib/pik/scripts/powershell_file.rb
  2. +8 −2 tools/pik.ps1
@@ -17,15 +17,15 @@ def call(exe)
end
def echo(str)
- "Write-Host #{str}"
+ @lines << "Write-Host #{str}"
end
def set(items)
items.each do |k,v|
@lines << if v
"$ENV:#{k}=\"#{v}\""
else
- "Remove-Item ENV:#{k}"
+ "if ($ENV:#{k}){ Remove-Item ENV:#{k} }"
end
end
View
@@ -1,3 +1,9 @@
pik_runner.exe $MyInvocation.MyCommand.Definition $args
-if(test-path -path "$ENV:HOME\.pik\pik_run.ps1"){& $ENV:HOME\.pik\pik_run.ps1}
-
+if($ENV:PIK_HOME)
+ {
+ if(test-path "$ENV:PIK_HOME\pik_run.ps1"){& $ENV:HOME\.pik\pik_run.ps1 }
+ }
+else
+ {
+ if(test-path "$ENV:HOME\.pik\pik_run.ps1"){& $ENV:HOME\.pik\pik_run.ps1 }
+ }

0 comments on commit 4c98930

Please sign in to comment.