@@ -256,20 +256,20 @@ class BashShellScript extends ShellScript {
256256
257257 override predicate getAWriteToGitHubEnv ( string name , string data ) {
258258 exists ( string raw |
259- Bash:: extractFileWrite ( this . getRawScript ( ) , "GITHUB_ENV" , raw ) and
259+ Bash:: extractFileWrite ( this , "GITHUB_ENV" , raw ) and
260260 Bash:: extractVariableAndValue ( raw , name , data )
261261 )
262262 }
263263
264264 override predicate getAWriteToGitHubOutput ( string name , string data ) {
265265 exists ( string raw |
266- Bash:: extractFileWrite ( this . getRawScript ( ) , "GITHUB_OUTPUT" , raw ) and
266+ Bash:: extractFileWrite ( this , "GITHUB_OUTPUT" , raw ) and
267267 Bash:: extractVariableAndValue ( raw , name , data )
268268 )
269269 }
270270
271271 override predicate getAWriteToGitHubPath ( string data ) {
272- Bash:: extractFileWrite ( this . getRawScript ( ) , "GITHUB_PATH" , data )
272+ Bash:: extractFileWrite ( this , "GITHUB_PATH" , data )
273273 }
274274
275275 override predicate getAnEnvReachingGitHubOutputWrite ( string var , string output_field ) {
@@ -542,12 +542,12 @@ module Bash {
542542 blockFileWrite ( script , cmd , file , content , filters )
543543 }
544544
545- bindingset [ script , file_var]
546- predicate extractFileWrite ( string script , string file_var , string content ) {
545+ bindingset [ file_var]
546+ predicate extractFileWrite ( BashShellScript script , string file_var , string content ) {
547547 // single line assignment
548548 exists ( string file_expr , string raw_content |
549549 isParameterExpansion ( file_expr , file_var , _, _) and
550- singleLineFileWrite ( script .splitAt ( "\n" ) , _, file_expr , raw_content , _) and
550+ singleLineFileWrite ( script .getAStmt ( ) , _, file_expr , raw_content , _) and
551551 content = trimQuotes ( raw_content )
552552 )
553553 or
@@ -566,12 +566,12 @@ module Bash {
566566 cmd = "add-path" and
567567 content = value
568568 ) and
569- singleLineWorkflowCmd ( script .splitAt ( "\n" ) , cmd , key , value )
569+ singleLineWorkflowCmd ( script .getAStmt ( ) , cmd , key , value )
570570 )
571571 or
572572 // multiline assignment
573573 exists ( string file_expr , string raw_content |
574- multiLineFileWrite ( script , _, file_expr , raw_content , _) and
574+ multiLineFileWrite ( script . getRawScript ( ) , _, file_expr , raw_content , _) and
575575 isParameterExpansion ( file_expr , file_var , _, _) and
576576 content = trimQuotes ( raw_content )
577577 )
0 commit comments