File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,6 @@ package gptscript
3
3
import (
4
4
"context"
5
5
"fmt"
6
- "os"
7
-
8
6
"github.com/gptscript-ai/gptscript/pkg/builtin"
9
7
"github.com/gptscript-ai/gptscript/pkg/cache"
10
8
"github.com/gptscript-ai/gptscript/pkg/engine"
@@ -17,6 +15,8 @@ import (
17
15
"github.com/gptscript-ai/gptscript/pkg/repos/runtimes"
18
16
"github.com/gptscript-ai/gptscript/pkg/runner"
19
17
"github.com/gptscript-ai/gptscript/pkg/types"
18
+ "os"
19
+ "path/filepath"
20
20
)
21
21
22
22
var log = mvl .Package ()
@@ -113,6 +113,12 @@ func (g *GPTScript) getEnv(env []string) ([]string, error) {
113
113
if err != nil {
114
114
return nil , err
115
115
}
116
+ } else if ! filepath .IsAbs (g .WorkspacePath ) {
117
+ var err error
118
+ g .WorkspacePath , err = filepath .Abs (g .WorkspacePath )
119
+ if err != nil {
120
+ return nil , err
121
+ }
116
122
}
117
123
if err := os .MkdirAll (g .WorkspacePath , 0700 ); err != nil {
118
124
return nil , err
You can’t perform that action at this time.
0 commit comments