Skip to content

Commit

Permalink
Merge pull request #3 from intersystems/fix-web-app-target
Browse files Browse the repository at this point in the history
Copy to proper directory
  • Loading branch information
isc-tleavitt authored Sep 1, 2022
2 parents 755d0ea + 873bc05 commit e0cbaf6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-

### Fixed
-
- Web application files are copied to proper target, not the current working directory

### Security
-
Expand Down
7 changes: 5 additions & 2 deletions cls/pkg/isc/ipm/js/base/processor.cls
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ Method OnBeforePhase(pPhase As %String, ByRef pParams) As %Status
} ElseIf (pPhase = "Activate") {
// Move files to the right place.
Set sourceDir = ##class(%Library.File).NormalizeDirectory(..GetSourceDirectory())
Set targetDir = $System.CSP.GetFileName(..GetTargetDirectory())
Set targetDir = ..GetTargetDirectory()
If (targetDir = "") {
// Should never happen, but good to be safe (and avoid using working directory)
$$$ThrowStatus($$$ERROR($$$GeneralError,"Target directory not specified."))
}
Set testFile = sourceDir_"index.html"
If '##class(%Library.File).Exists(testFile) {
$$$ThrowStatus($$$ERROR($$$GeneralError,$$$FormatText("File '%1' does not exist; will not activate %2 UI changes.",testFile,..#FLAVOR)))
Expand Down Expand Up @@ -412,4 +416,3 @@ ClassMethod SanitizeWebAppBase(base As %String) As %String
}

}

0 comments on commit e0cbaf6

Please sign in to comment.