diff --git a/lib/train/extras/windows_file.rb b/lib/train/extras/windows_file.rb index 0236becf..8d5283af 100644 --- a/lib/train/extras/windows_file.rb +++ b/lib/train/extras/windows_file.rb @@ -26,7 +26,9 @@ def content end def exist? - nil + return @exist if defined?(@exist) + @exist = @backend.run_command( + "(Test-Path -Path \"#{@spath}\").ToString()").stdout.chomp == 'True' end def link_target