fix forking workspace scripts on app incorrect path

This commit is contained in:
Ruben Fiszel
2023-07-13 11:25:06 +02:00
parent f539dbe298
commit 804317cf54
2 changed files with 5 additions and 2 deletions
@@ -232,6 +232,9 @@ pub async fn handle_python_job(
.replace("-", "_");
let dirs = if dirs_full.len() > 0 {
dirs_full
.strip_prefix("/")
.unwrap_or(&dirs_full)
.to_string()
} else {
"tmp".to_string()
};
@@ -9,7 +9,7 @@
import type { Schema } from '$lib/common'
import Badge from '$lib/components/common/badge/Badge.svelte'
import Editor from '$lib/components/Editor.svelte'
import { emptySchema, getModifierKey } from '$lib/utils'
import { defaultIfEmptyString, emptySchema, getModifierKey } from '$lib/utils'
import { computeFields } from './utils'
import { deepEqual } from 'fast-equals'
import type { AppInput } from '../../inputType'
@@ -53,7 +53,7 @@
return schema
}
$: inlineScript && (inlineScript.path = `${appPath}/${name}`)
$: inlineScript && (inlineScript.path = `${defaultIfEmptyString(appPath, '')}/${name}`)
onMount(async () => {
if (inlineScript && !inlineScript.schema) {