Skip to content

Commit

Permalink
Use path from AQUATONE_OUT_PATH environment variable as output direct…
Browse files Browse the repository at this point in the history
…ory if defined
  • Loading branch information
michenriksen committed May 6, 2019
1 parent b77953e commit 24858e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added
- Support for processing of multiple URLs on the same host by appending hash of URL path and fragment to file names
- Support for defining default output directory in `AQUATONE_OUT_PATH` environment variable

## [1.5.0]

Expand Down
5 changes: 5 additions & 0 deletions core/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ func NewSession() (*Session, error) {
}
}

envOutPath := os.Getenv("AQUATONE_OUT_PATH")
if *session.Options.OutDir == "." && envOutPath != "" {
session.Options.OutDir = &envOutPath
}

outdir := filepath.Clean(*session.Options.OutDir)
session.Options.OutDir = &outdir

Expand Down

0 comments on commit 24858e9

Please sign in to comment.