Skip to content

Commit 7221be1

Browse files
Merge pull request #144 from ibuildthecloud/distribution
Add some helpful log messages
2 parents 5c18177 + b1b8cc6 commit 7221be1

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

pkg/cli/gptscript.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type GPTScript struct {
4242
Output string `usage:"Save output to a file, or - for stdout" short:"o"`
4343
Input string `usage:"Read input from a file (\"-\" for stdin)" short:"f"`
4444
SubTool string `usage:"Use tool of this name, not the first tool in file"`
45-
Assemble bool `usage:"Assemble tool to a single artifact, saved to --output"`
45+
Assemble bool `usage:"Assemble tool to a single artifact, saved to --output" hidden:"true"`
4646
ListModels bool `usage:"List the models available and exit"`
4747
ListTools bool `usage:"List built-in tools and exit"`
4848
Server bool `usage:"Start server"`

pkg/repos/runtimes/golang/golang.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ func stripGo(env []string) (result []string) {
7676
}
7777

7878
func (r *Runtime) runBuild(ctx context.Context, toolSource, binDir string, env []string) error {
79+
log.Infof("Running go build in %s", toolSource)
7980
cmd := debugcmd.New(ctx, filepath.Join(binDir, "go"), "build", "-o", "bin/gptscript-go-tool")
8081
cmd.Env = stripGo(env)
8182
cmd.Dir = toolSource

pkg/repos/runtimes/node/node.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ func (r *Runtime) getReleaseAndDigest() (string, string, error) {
101101
}
102102

103103
func (r *Runtime) runNPM(ctx context.Context, toolSource, binDir string, env []string) error {
104+
log.Infof("Running npm in %s", toolSource)
104105
cmd := debugcmd.New(ctx, filepath.Join(binDir, "npm"), "install")
105106
cmd.Env = env
106107
cmd.Dir = toolSource

pkg/repos/runtimes/python/python.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ func (r *Runtime) Supports(cmd []string) bool {
5353
}
5454

5555
func (r *Runtime) installVenv(ctx context.Context, binDir, venvPath string) error {
56+
log.Infof("Creating virtualenv in %s", venvPath)
5657
cmd := debugcmd.New(ctx, filepath.Join(binDir, "uv"), "venv", "-p",
5758
filepath.Join(binDir, "python3"), venvPath)
5859
return cmd.Run()
@@ -105,6 +106,7 @@ func (r *Runtime) getReleaseAndDigest() (string, string, error) {
105106
}
106107

107108
func (r *Runtime) runPip(ctx context.Context, toolSource, binDir string, env []string) error {
109+
log.Infof("Running pip in %s", toolSource)
108110
for _, req := range []string{"requirements-gptscript.txt", "requirements.txt"} {
109111
reqFile := filepath.Join(toolSource, req)
110112
if s, err := os.Stat(reqFile); err == nil && !s.IsDir() {

0 commit comments

Comments
 (0)