Skip to content

Commit f07bf91

Browse files
authored
Fix publish attribute setting
1 parent fb4a9a4 commit f07bf91

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ads/opctl/conda/cmds.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,8 @@ def _publish(
626626
pack_script = os.path.join(os.path.dirname(os.path.abspath(__file__)), "pack.py")
627627
if not skip_archive:
628628
if is_in_notebook_session() or NO_CONTAINER:
629-
command = f"python {pack_script} --conda-path {pack_folder_path}"
629+
# Set the CONDA_PUBLISH_TYPE environment variable so that the `type` attribute inside the manifest is not changed
630+
command = f"CONDA_PUBLISH_TYPE={os.environ.get('CONDA_PUBLISH_TYPE','')} python {pack_script} --conda-path {pack_folder_path}"
630631
run_command(command, shell=True)
631632
else:
632633
volumes = {

0 commit comments

Comments
 (0)