Skip to content

Commit

Permalink
otk: target_requested goes earlier
Browse files Browse the repository at this point in the history
We need this available earlier otherwise the next check fails.

Signed-off-by: Simon de Vlieger <[email protected]>
  • Loading branch information
supakeen committed May 30, 2024
1 parent cda3181 commit 546591b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/otk/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@ def compile(
log.fatal("INPUT contains multiple targets, `-t` is required")
return 1

# set the requested target to the default case now that we know that
# there aren't multiple targets available and none are requested
target_requested = list(target_available.keys())[0]

if target_requested not in target_available:
log.fatal(
"requested target %r does not exist in INPUT", target_requested
)
return 1

# set the requested target to the default case now that we know that
# there aren't multiple targets available and none are requested
target_requested = list(target_available.keys())[0]

# resolve the full tree first
tree = resolve(ctx, doc.tree)

Expand Down

0 comments on commit 546591b

Please sign in to comment.