Skip to content

Commit d4c76ff

Browse files
committed
【修改】:解决 env 切换版本出现错误的问题
1 parent a547396 commit d4c76ff

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cmds/cmd_package.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ def install_pkg(env_root, bsp_root, pkg):
220220
cmd = 'git clone ' + package_url + ' ' + repo_path
221221
os.system(cmd)
222222
os.chdir(repo_path)
223-
cmd = 'git checkout -q ' + ver_sha
223+
224+
#print("Checkout SHA : %s"%ver_sha)
225+
cmd = 'git reset --hard ' + ver_sha
224226
os.system(cmd)
225227

226228
# If there is a .gitmodules file in the package, prepare to update the
@@ -248,9 +250,6 @@ def install_pkg(env_root, bsp_root, pkg):
248250
cmd = 'git remote set-url origin ' + url_from_json
249251
os.system(cmd)
250252

251-
cmd = 'git reset --hard origin/master'
252-
os.system(cmd)
253-
254253
os.chdir(beforepath)
255254
else:
256255
# Download a package of compressed package type.

0 commit comments

Comments
 (0)