Skip to content

Commit 6317207

Browse files
authored
Fix parameter order for build_image/build_context in main (#750)
This fixes a regression from d2dee6a which added the graph config arg but then got the order wrong in these calls which lead to `TypeError: unhashable type: '_Environ'` in image_path when calling `taskgraph build-image` ``` Traceback (most recent call last): File "src/taskgraph/main.py", line 1020, in main return args.command(vars(args)) ~~~~~~~~~~~~^^^^^^^^^^^^ File "src/taskgraph/main.py", line 593, in build_image build_image(args["image_name"], args["tag"], os.environ, graph_config) ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "src/taskgraph/docker.py", line 122, in build_image image_dir = docker.image_path(name, graph_config) File "src/taskgraph/util/docker.py", line 225, in image_path paths = image_paths(graph_config) TypeError: unhashable type: '_Environ' ```
1 parent 0f5bd70 commit 6317207

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/taskgraph/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,10 +590,10 @@ def build_image(args):
590590
graph_config = load_graph_config(root)
591591

592592
if args["context_only"] is None:
593-
build_image(args["image_name"], args["tag"], os.environ, graph_config)
593+
build_image(args["image_name"], args["tag"], graph_config, os.environ)
594594
else:
595595
build_context(
596-
args["image_name"], args["context_only"], os.environ, graph_config
596+
args["image_name"], args["context_only"], graph_config, os.environ
597597
)
598598

599599

0 commit comments

Comments
 (0)