Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/workflows/test-mlc-core-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
6 changes: 6 additions & 0 deletions mlc/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading