Skip to content

Commit f044309

Browse files
authored
fix: avoid panicking by initializing required client for static site (#5530)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.
1 parent b4efb96 commit f044309

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/pkg/cli/init.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,11 @@ func newInitOpts(vars initVars) (*initOpts, error) {
353353
opts.mftReader = ws
354354
opts.wsAppName = initAppCmd.name
355355
opts.wsRoot = ws.ProjectRoot()
356+
sourceSel, err := selector.NewLocalFileSelector(prompt, fs, ws)
357+
if err != nil {
358+
return fmt.Errorf("init a new local file selector: %w", err)
359+
}
360+
opts.sourceSel = sourceSel
356361
opts.wsPendingCreation = false
357362
}
358363
o.initWlCmd = &opts

0 commit comments

Comments
 (0)