File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,8 @@ func (a *Application) Run() {
333
333
}
334
334
335
335
a .Workflow .Initialize ()
336
+ godotenv .Load (a .Workflow .Settings .DotEnvFiles ... )
337
+ a .JsEngine .CreateEnvironmentVariables ()
336
338
a .JsEngine .CreateAppVariables ()
337
339
338
340
a .hookSignals ()
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ type WorkflowSettings struct {
43
43
Defaults * WorkflowSettingsDefaults `yaml:"defaults"`
44
44
RemoteIndexUrl string `yaml:"remote-index-url"`
45
45
ExitOnChecksumMismatch bool `yaml:"exit-on-checksum-mismatch"`
46
+ DotEnvFiles []string `yaml:"dotenv"`
46
47
}
47
48
48
49
type WorkflowSettingsDefaults struct {
@@ -278,6 +279,7 @@ func (workflow *StackupWorkflow) Initialize() {
278
279
// no default settings were provided, so create sensible defaults
279
280
if workflow .Settings == nil {
280
281
workflow .Settings = & WorkflowSettings {
282
+ DotEnvFiles : []string {".env" },
281
283
Defaults : & WorkflowSettingsDefaults {
282
284
Tasks : & WorkflowSettingsDefaultsTasks {
283
285
Silent : false ,
@@ -288,6 +290,10 @@ func (workflow *StackupWorkflow) Initialize() {
288
290
}
289
291
}
290
292
293
+ if len (workflow .Settings .DotEnvFiles ) == 0 {
294
+ workflow .Settings .DotEnvFiles = []string {".env" }
295
+ }
296
+
291
297
// copy the default settings into each task if appropriate
292
298
for _ , task := range workflow .Tasks {
293
299
if task .Path == "" && len (workflow .Settings .Defaults .Tasks .Path ) > 0 {
You can’t perform that action at this time.
0 commit comments