Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions getdeck/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,17 @@ def read_deckfile_from_location(
logger.info(f"Reading Deckfile from: {location}")
if location == ".":
# load default file from this location
return config.deckfile_selector.get(
os.path.join(os.getcwd(), configuration.DECKFILE_FILE)
)
deckfile_location = os.path.join(os.getcwd(), configuration.DECKFILE_FILE)
if os.path.isfile(deckfile_location):
logger.debug("Is file location")
return (
config.deckfile_selector.get(deckfile_location),
os.path.dirname(deckfile_location),
False,
)
else:
raise RuntimeError(f"Cannot identify {location} as Deckfile")

elif protocol == "git":
if "#" in location:
ref, rev = location.split("#")
Expand Down