mirror of
https://github.com/sasjs/adapter.git
synced 2025-12-11 01:14:36 +00:00
Merge pull request #417 from sasjs/force-sas9-webout
fix(sas9): force webout output when executing arbitrary code on SAS9
This commit is contained in:
@@ -45,7 +45,16 @@ export class SAS9ApiClient {
|
||||
) {
|
||||
await this.requestClient.login(userName, password, this.jobsPath)
|
||||
|
||||
const formData = generateFileUploadForm(linesOfCode.join('\n'))
|
||||
// This piece of code forces a webout to prevent Stored Process Errors.
|
||||
const forceOutputCode = [
|
||||
'data _null_;',
|
||||
'file _webout;',
|
||||
`put 'Executed sasjs run';`,
|
||||
'run;'
|
||||
]
|
||||
const formData = generateFileUploadForm(
|
||||
[...linesOfCode, ...forceOutputCode].join('\n')
|
||||
)
|
||||
|
||||
const codeInjectorPath = `/User Folders/${userName}/My Folder/sasjs/runner`
|
||||
const contentType =
|
||||
|
||||
Reference in New Issue
Block a user