File tree Expand file tree Collapse file tree
jsreport/jsreport.Embedded Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,17 +128,25 @@ if (-Not (Test-Path $jsreport)) {
128128$jsreportPath = join-path $projectDirectory jsreport
129129$installPath = join-path $projectDirectory jsreport/ install.cmd
130130$installToolsPath = join-path $toolsPath jsreport/ install.cmd
131+ $installModulePath = join-path $toolsPath / install.js
131132
132133if (Test-Path $installPath ) {
133134 write-Host " Copy " $installToolsPath " to " $jsreportPath
134135 Copy-Item $installToolsPath - destination $jsreportPath - Force
135136
136137 Push-Location $jsreportPath
137138 write-Host " Running " $installPath
138- & $installPath
139+ & $installPath $installModulePath
139140
140141 if ($lastexitcode ) {
141- throw ' Failed to install jsreport from npm, check install-log.txt for details'
142+ write-Host " ERROR Exit code: " $lastexitcode
143+ if ($lastexitcode -eq 87 ) {
144+ throw ' Empty installModulePath parameter.'
145+ }
146+ if ($lastexitcode -eq 2 ) {
147+ throw ' installModulePath not found.'
148+ }
149+ throw ' Failed to install jsreport from npm, check install-log.txt for details'
142150 }
143151}
144152
Original file line number Diff line number Diff line change 11REM This is being run by the nuget install and also if you run update.cmd, there should be no need to run it manually otherwise
2+ set installScriptPath = %~1
23
34if exist " install.js" (
4- " ../.bin/node.cmd" install.js
5- ) else (
6- " ../.bin/node.cmd" " ../../packages/jsreport.Embedded.1.0.3/tools/install.js"
5+ " ../.bin/node.cmd" install.js
6+ exit /b
77)
88
9+ if " %installScriptPath% " == " " (
10+ exit /b 87
11+ )
12+
13+ if not exist " %installScriptPath% " (
14+ exit /b 2
15+ )
916
17+ " ../.bin/node.cmd" " %installScriptPath% "
You can’t perform that action at this time.
0 commit comments