@@ -134,16 +134,37 @@ func (c *TsunamiController) Start(ctx context.Context, blockMeta waveobj.MetaMap
134134 if scaffoldPath == "" {
135135 return fmt .Errorf ("tsunami:scaffoldpath is required" )
136136 }
137+ scaffoldPath , err := wavebase .ExpandHomeDir (scaffoldPath )
138+ if err != nil {
139+ return fmt .Errorf ("tsunami:scaffoldpath invalid: %w" , err )
140+ }
141+ if ! filepath .IsAbs (scaffoldPath ) {
142+ return fmt .Errorf ("tsunami:scaffoldpath must be absolute: %s" , scaffoldPath )
143+ }
137144
138145 sdkReplacePath := blockMeta .GetString (waveobj .MetaKey_TsunamiSdkReplacePath , "" )
139146 if sdkReplacePath == "" {
140147 return fmt .Errorf ("tsunami:sdkreplacepath is required" )
141148 }
149+ sdkReplacePath , err = wavebase .ExpandHomeDir (sdkReplacePath )
150+ if err != nil {
151+ return fmt .Errorf ("tsunami:sdkreplacepath invalid: %w" , err )
152+ }
153+ if ! filepath .IsAbs (sdkReplacePath ) {
154+ return fmt .Errorf ("tsunami:sdkreplacepath must be absolute: %s" , sdkReplacePath )
155+ }
142156
143157 appPath := blockMeta .GetString (waveobj .MetaKey_TsunamiAppPath , "" )
144158 if appPath == "" {
145159 return fmt .Errorf ("tsunami:apppath is required" )
146160 }
161+ appPath , err = wavebase .ExpandHomeDir (appPath )
162+ if err != nil {
163+ return fmt .Errorf ("tsunami:apppath invalid: %w" , err )
164+ }
165+ if ! filepath .IsAbs (appPath ) {
166+ return fmt .Errorf ("tsunami:apppath must be absolute: %s" , appPath )
167+ }
147168
148169 appName := filepath .Base (appPath )
149170 osArch := runtime .GOOS + "-" + runtime .GOARCH
0 commit comments