Skip to content

Commit 7894095

Browse files
committed
Do not copy the source when running
1 parent 3a46d87 commit 7894095

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/swift-sh/OptionGroups/BuildAndRunOptions.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ final class BuildAndRunOptions : ParsableArguments {
3434

3535
let scriptSource = try (
3636
!scriptPathIsContent ?
37-
ScriptSource(copying: FilePath(scriptPathOrContent), fileManager: fm) :
37+
(
38+
forceCopySource ?
39+
ScriptSource(copying: FilePath(scriptPathOrContent), fileManager: fm) :
40+
ScriptSource(path: FilePath(scriptPathOrContent), fileManager: fm)
41+
) :
3842
ScriptSource(content: scriptPathOrContent, fileManager: fm, logger: logger)
3943
)
4044
let scriptPath = try scriptSource.scriptPath?.0 ?! InternalError(message: "scriptPath is nil")

0 commit comments

Comments
 (0)