diff --git a/.github/workflows/test-mlc-core-actions.yaml b/.github/workflows/test-mlc-core-actions.yaml index 31b7c73e7..6a22b3cc8 100644 --- a/.github/workflows/test-mlc-core-actions.yaml +++ b/.github/workflows/test-mlc-core-actions.yaml @@ -142,6 +142,7 @@ jobs: - name: Test 11 - cp script - Copy mlc script run: | mlc cp script detect-os my-os-detect + mlc cp script detect-os/ my-os-detect-1 - name: Test 12 - add repo - Add a new MLC repo run: | diff --git a/mlc/action.py b/mlc/action.py index 34beccf7b..9b99da805 100644 --- a/mlc/action.py +++ b/mlc/action.py @@ -503,13 +503,19 @@ def cp(self, run_args): inp = {} src_item = run_args.get('src') src_tags = None + if src_item: + # remove backslash if there in src item + if src_item.endswith('/'): + src_item = src_item[:-1] + src_split = src_item.split(":") if len(src_split) > 1: src_repo = src_split[0].strip() src_item = src_split[1].strip() else: src_item = src_split[0].strip() + inp['alias'] = src_item inp['folder_name'] = src_item #we dont know if the user gave the alias or the folder name, we first check for alias and then the folder name