Ben şef yürütmek şu var:bir windows yolu dizede bir öznitelik başvuran
#execute
execute 'service-api install' do
command 'c:\buildinfo\service-api\api\approot\web-#{node['default']['env']}.cmd'
end
pencere ve # işleyiş {düğümü [ 'default'] [ 'env']} olan bir öznitelik ben Yukarıdaki yol dizesinde referans vermeye çalışıyorum. Bunu çalıştırdığınızda
aşağıdaki hatayı olsun:
#execute
execute 'service-api install' do
command "c:\buildinfo\service-api\api\approot\web-#{node['default']['env']}.cmd"
end
eğik çizgi (? Kaçış karakteri) farklı bir renkte görüntüler ve aşağıdaki hatayı alıyorum: Ben
> SyntaxError
> ==> default: -----------
> ==> default: C:\vagrant-chef\319622f1791bb50a8f9441fd4c1ff806\cookbooks\djcm_paypal_win\recipes\installService.rb:76:
> syntax error, unexpected tIDENTIFIER, expecting keyword_end
> ==> default: ...api\approot\web-#{node['default']['env']}.cmd'
çalışırsanız :
[execute] The filename, directory name, or volume label syntax is incorrect.
command "c:\buildinfo ervice-api\api\approotweb-integration.cmd"
Bu yüzden eğik çizgilerle uğraşır, ancak özniteliği alır. Eğik çizgileri olan bir dizede nasıl öznitelik verebilirim?
düzenleme 1: Şimdi çift doğru eğrileri ve diğer çözümü denedim, şimdi doğru yolu bulmaya çalışsa da, dosya tam olarak bu konumda bulunsa bile yine de hata veriyor ve el ile çalıştırabilirim. Herhangi bir fikir ? Şimdi
hatası:
* execute[service-api install] action run
==> default: [execute] The system cannot find the path specified.
==> default:
==> default:
==> default: ================================================================================
==> default: Error executing action `run` on resource 'execute[service-api install]'
==> default: ================================================================================
==> default:
==> default: Mixlib::ShellOut::ShellCommandFailed
==> default: ------------------------------------
==> default: Expected process to exit with [0], but received '1'
==> default: ---- Begin output of c:\buildinfo\service-api\api\approot\web-integration.cmd ----
==> default: STDOUT:
==> default: STDERR: The system cannot find the path specified.
==> default: ---- End output of c:\buildinfo\service-api\api\approot\web-integration.cmd ----
==> default: Ran c:\buildinfo\service-api\api\approot\web-integration.cmd returned 1
' c çift eğik çizgi kullanmayı deneyin. – vee
@vee - daha fazla bilgi edinin lütfen – Scooby