Skip to content

Commit fa41bce

Browse files
authored
Fix typo in "Using a Jenkinsfile" page (jenkins-infra#8889)
sh will not escape variables in arguments surrounded by single-quotes. Double-quotes have to be used instead.
1 parent 2aa074e commit fa41bce

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

content/doc/book/pipeline/jenkinsfile.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,11 +654,11 @@ node {
654654
withCredentials([string(credentialsId: 'mytoken', variable: 'TOKEN')]) {
655655
sh /* WRONG! */ """
656656
set +x
657-
curl -H 'Token: $TOKEN' https://some.api/
657+
curl -H "Token: $TOKEN" https://some.api/
658658
"""
659659
sh /* CORRECT */ '''
660660
set +x
661-
curl -H 'Token: $TOKEN' https://some.api/
661+
curl -H "Token: $TOKEN" https://some.api/
662662
'''
663663
}
664664
}

0 commit comments

Comments
 (0)