Skip to content

Commit b99dcdb

Browse files
Merge pull request #146379 from rail/blathers/backport-release-25.2-146366
release-25.2: build: remove ssh key on exit only on TeamCity agents
2 parents e4ea662 + 0e9215a commit b99dcdb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build/teamcity-support.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ source "$root/build/teamcity-common-support.sh"
1212
source "$root/build/teamcity/util.sh"
1313

1414
remove_files_on_exit() {
15-
rm -f ~/.ssh/id_rsa{,.pub}
15+
# Remove the ssh key on exit only on TeamCity agents, not on the local machine.
16+
rm -f ~agent/.ssh/id_rsa{,.pub}
1617
common_support_remove_files_on_exit
1718
}
1819
trap remove_files_on_exit EXIT

0 commit comments

Comments
 (0)