Skip to content

Commit

Permalink
External Commands: Add comment re directory changing.
Browse files Browse the repository at this point in the history
  • Loading branch information
geofurlong committed Apr 14, 2024
1 parent ddcc230 commit c199a13
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/builder/external_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func runPython(cfg GeofurlongConfig, scriptFn string, params string) {
err = os.Chdir(cfg["scripts_dir"])
geocode.Check(err)

// Ensure the working directory is reset after the function completes.
defer func() {
err = os.Chdir(originalDir)
geocode.Check(err)
Expand Down

0 comments on commit c199a13

Please sign in to comment.