src/amp/runtime/runtime.go |
| ... | ... | @@ -193,7 +193,7 @@ func InitProcess(name, runPath string) { |
| 193 | 193 | // Process Default Runtime Opts |
| 194 | 194 | // ----------------------------------------------------------------------------- |
| 195 | 195 | |
| 196 | | -func DefaultOpts(name string, opts *optparse.OptionParser, argv []string, consoleFilter logging.Filter) (bool, string) { |
| 196 | +func DefaultOpts(name string, opts *optparse.OptionParser, argv []string, consoleFilter logging.Filter) (bool, string, string) { |
| 197 | 197 | |
| 198 | 198 | var ( |
| 199 | 199 | configPath string |
| ... | ... | @@ -227,16 +227,12 @@ func DefaultOpts(name string, opts *optparse.OptionParser, argv []string, consol |
| 227 | 227 | |
| 228 | 228 | // Print the default YAML config file if the ``-g`` flag was specified. |
| 229 | 229 | if *genConfig { |
| 230 | | - opts.PrintDefaultConfigFile() |
| 230 | + opts.PrintDefaultConfigFile(name) |
| 231 | 231 | Exit(0) |
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | // Assume the parent directory of the config as the instance directory. |
| 235 | 235 | if len(args) >= 1 { |
| 236 | | - if args[0] == "help" { |
| 237 | | - opts.PrintUsage() |
| 238 | | - Exit(0) |
| 239 | | - } |
| 240 | 236 | configPath, err = filepath.Abs(filepath.Clean(args[0])) |
| 241 | 237 | if err != nil { |
| 242 | 238 | StandardError(err) |
| ... | ... | @@ -315,7 +311,7 @@ func DefaultOpts(name string, opts *optparse.OptionParser, argv []string, consol |
| 315 | 311 | // Initialise the process-related resources. |
| 316 | 312 | InitProcess(name, runPath) |
| 317 | 313 | |
| 318 | | - return *debug, instanceDirectory |
| 314 | + return *debug, instanceDirectory, runPath |
| 319 | 315 | |
| 320 | 316 | } |
| 321 | 317 | |