From f36d359764b41e0c0bf34a12652a06b325da37a6 Mon Sep 17 00:00:00 2001<br/>From: "Yi.Jin" <[email protected]><br/>Date: Wed, 29 Jan 2025 23:03:46 +0800<br/>Subject: [PATCH] Signed-off-by: Yi.Jin <[email protected]><br/><br/>Fix: Handle relative paths in replacements to avoid potential bugs.<br/>---<br/> scripts/git | 4 +++-<br/> 1 file changed, 3 insertions(+), 1 deletion(-)<br/><br/>diff --git a/scripts/git b/scripts/git<br/>index 689adbf9dd..63adfd084e 100755<br/>--- a/scripts/git<br/>+++ b/scripts/git<br/>@@ -16,7 +16,9 @@ os.environ['PSEUDO_UNLOAD'] = '1'<br/> path = os.environ['PATH']<br/> # we need to remove our path but also any other copy of this script which<br/> # may be present, e.g. eSDK.<br/>-replacements = [os.path.dirname(sys.argv[0])]<br/>+script_path = os.path.abspath(sys.argv[0])<br/>+script_path = os.path.dirname(script_path)<br/>+replacements = [script_path]<br/> for p in path.split(":"):<br/> if p.endswith("/scripts"):<br/> replacements.append(p)<br/><br/>
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#115143): https://lists.openembedded.org/g/openembedded-devel/message/115143 Mute This Topic: https://lists.openembedded.org/mt/110890364/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
