Skip to content

Commit

Permalink
Path fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelOnFira committed Oct 26, 2021
1 parent 2704c42 commit 0046b0a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/create-envfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,11 @@
# .env is set by default
file_name = str(os.environ.get("INPUT_FILE_NAME", ".env"))

with open(os.path.join(".", directory, file_name), "w") as text_file:
path = str(os.environ.get("GITHUB_WORKSPACE", "."))

# This should resolve https://github.com/SpicyPizza/create-envfile/issues/27
if path in ["", "None"]:
path = "."

with open(os.path.join(path, directory, file_name), "w") as text_file:
text_file.write(out_file)

0 comments on commit 0046b0a

Please sign in to comment.