mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-17 09:00:06 +00:00
fix(job-execution): fix program path for absolute path jobs
This commit is contained in:
@@ -1032,18 +1032,18 @@ export class SASViyaApiClient {
|
|||||||
|
|
||||||
let jobToExecute: Job | undefined
|
let jobToExecute: Job | undefined
|
||||||
let jobName: string | undefined
|
let jobName: string | undefined
|
||||||
|
let jobPath: string | undefined
|
||||||
if (isRelativePath(sasJob)) {
|
if (isRelativePath(sasJob)) {
|
||||||
const folderName = sasJob.split('/')[0]
|
const folderName = sasJob.split('/')[0]
|
||||||
jobName = sasJob.split('/')[1]
|
jobName = sasJob.split('/')[1]
|
||||||
const jobFolder = this.folderMap.get(
|
jobPath = `${this.rootFolderName}/${folderName}`
|
||||||
`${this.rootFolderName}/${folderName}`
|
const jobFolder = this.folderMap.get(jobPath)
|
||||||
)
|
|
||||||
jobToExecute = jobFolder?.find((item) => item.name === jobName)
|
jobToExecute = jobFolder?.find((item) => item.name === jobName)
|
||||||
} else {
|
} else {
|
||||||
const folderPathParts = sasJob.split('/')
|
const folderPathParts = sasJob.split('/')
|
||||||
jobName = folderPathParts.pop()
|
jobName = folderPathParts.pop()
|
||||||
const folderPath = folderPathParts.join('/')
|
jobPath = folderPathParts.join('/')
|
||||||
const jobFolder = this.folderMap.get(folderPath)
|
const jobFolder = this.folderMap.get(jobPath)
|
||||||
jobToExecute = jobFolder?.find((item) => item.name === jobName)
|
jobToExecute = jobFolder?.find((item) => item.name === jobName)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1071,7 +1071,7 @@ export class SASViyaApiClient {
|
|||||||
|
|
||||||
const jobArguments: { [key: string]: any } = {
|
const jobArguments: { [key: string]: any } = {
|
||||||
_contextName: contextName,
|
_contextName: contextName,
|
||||||
_program: `${this.rootFolderName}/${sasJob}`,
|
_program: `${jobPath}/${sasJob}`,
|
||||||
_webin_file_count: files.length,
|
_webin_file_count: files.length,
|
||||||
_OMITJSONLISTING: true,
|
_OMITJSONLISTING: true,
|
||||||
_OMITJSONLOG: true,
|
_OMITJSONLOG: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user