@@ -601,7 +601,7 @@ func (s *RSuite) TestRenvEnvironmentErrorCheck_renvNotInstalled() {
601
601
602
602
executor := executortest .NewMockExecutor ()
603
603
executor .On ("RunCommand" , mock .Anything , []string {"--version" }, mock .Anything , mock .Anything ).Return ([]byte ("R version 4.3.0 (2023-04-21)" ), nil , nil )
604
- executor .On ("RunCommand" , "/usr/bin/R" , []string {"-s" , "-e" , "cat(system.file(package = \" renv\" ))" }, mock .Anything , mock .Anything ).Return ([]byte ("" ), nil , nil )
604
+ executor .On ("RunCommand" , mock . Anything , []string {"-s" , "-e" , "cat(system.file(package = \" renv\" ))" }, mock .Anything , mock .Anything ).Return ([]byte ("" ), nil , nil )
605
605
606
606
i , _ := NewRInterpreter (s .cwd , util.Path {}, log , executor , nil , nil )
607
607
interpreter := i .(* defaultRInterpreter )
@@ -626,7 +626,7 @@ func (s *RSuite) TestRenvEnvironmentErrorCheck_renvInstallCheckErr() {
626
626
renvCmdErr := errors .New ("renv command errrz" )
627
627
executor := executortest .NewMockExecutor ()
628
628
executor .On ("RunCommand" , mock .Anything , []string {"--version" }, mock .Anything , mock .Anything ).Return ([]byte ("R version 4.3.0 (2023-04-21)" ), nil , nil )
629
- executor .On ("RunCommand" , "/usr/bin/R" , []string {"-s" , "-e" , "cat(system.file(package = \" renv\" ))" }, mock .Anything , mock .Anything ).Return ([]byte ("" ), nil , renvCmdErr )
629
+ executor .On ("RunCommand" , mock . Anything , []string {"-s" , "-e" , "cat(system.file(package = \" renv\" ))" }, mock .Anything , mock .Anything ).Return ([]byte ("" ), nil , renvCmdErr )
630
630
631
631
i , _ := NewRInterpreter (s .cwd , util.Path {}, log , executor , nil , nil )
632
632
interpreter := i .(* defaultRInterpreter )
@@ -647,8 +647,8 @@ func (s *RSuite) TestRenvEnvironmentErrorCheck_renvRequiresInit() {
647
647
renvStatusOutput := []byte ("Use `renv::init()` to initialize the project." )
648
648
executor := executortest .NewMockExecutor ()
649
649
executor .On ("RunCommand" , mock .Anything , []string {"--version" }, mock .Anything , mock .Anything ).Return ([]byte ("R version 4.3.0 (2023-04-21)" ), nil , nil )
650
- executor .On ("RunCommand" , "/usr/bin/R" , []string {"-s" , "-e" , "cat(system.file(package = \" renv\" ))" }, mock .Anything , mock .Anything ).Return ([]byte ("/usr/dir/lib/R/x86_64/4.4/library/renv" ), nil , nil )
651
- executor .On ("RunCommand" , "/usr/bin/R" , []string {"-s" , "-e" , "renv::status()" }, mock .Anything , mock .Anything ).Return (renvStatusOutput , nil , nil )
650
+ executor .On ("RunCommand" , mock . Anything , []string {"-s" , "-e" , "cat(system.file(package = \" renv\" ))" }, mock .Anything , mock .Anything ).Return ([]byte ("/usr/dir/lib/R/x86_64/4.4/library/renv" ), nil , nil )
651
+ executor .On ("RunCommand" , mock . Anything , []string {"-s" , "-e" , "renv::status()" }, mock .Anything , mock .Anything ).Return (renvStatusOutput , nil , nil )
652
652
653
653
i , _ := NewRInterpreter (s .cwd , util.Path {}, log , executor , nil , nil )
654
654
interpreter := i .(* defaultRInterpreter )
@@ -673,8 +673,8 @@ func (s *RSuite) TestRenvEnvironmentErrorCheck_lockfileMissing() {
673
673
renvStatusOutput := []byte ("Use `renv::snapshot()` to create a lockfile." )
674
674
executor := executortest .NewMockExecutor ()
675
675
executor .On ("RunCommand" , mock .Anything , []string {"--version" }, mock .Anything , mock .Anything ).Return ([]byte ("R version 4.3.0 (2023-04-21)" ), nil , nil )
676
- executor .On ("RunCommand" , "/usr/bin/R" , []string {"-s" , "-e" , "cat(system.file(package = \" renv\" ))" }, mock .Anything , mock .Anything ).Return ([]byte ("/usr/dir/lib/R/x86_64/4.4/library/renv" ), nil , nil )
677
- executor .On ("RunCommand" , "/usr/bin/R" , []string {"-s" , "-e" , "renv::status()" }, mock .Anything , mock .Anything ).Return (renvStatusOutput , nil , nil )
676
+ executor .On ("RunCommand" , mock . Anything , []string {"-s" , "-e" , "cat(system.file(package = \" renv\" ))" }, mock .Anything , mock .Anything ).Return ([]byte ("/usr/dir/lib/R/x86_64/4.4/library/renv" ), nil , nil )
677
+ executor .On ("RunCommand" , mock . Anything , []string {"-s" , "-e" , "renv::status()" }, mock .Anything , mock .Anything ).Return (renvStatusOutput , nil , nil )
678
678
679
679
i , _ := NewRInterpreter (s .cwd , util.Path {}, log , executor , nil , nil )
680
680
interpreter := i .(* defaultRInterpreter )
@@ -699,8 +699,8 @@ func (s *RSuite) TestRenvEnvironmentErrorCheck_unknownRenvStatus() {
699
699
renvStatusOutput := []byte ("- The project is out-of-sync -- use `renv::status()` for details." )
700
700
executor := executortest .NewMockExecutor ()
701
701
executor .On ("RunCommand" , mock .Anything , []string {"--version" }, mock .Anything , mock .Anything ).Return ([]byte ("R version 4.3.0 (2023-04-21)" ), nil , nil )
702
- executor .On ("RunCommand" , "/usr/bin/R" , []string {"-s" , "-e" , "cat(system.file(package = \" renv\" ))" }, mock .Anything , mock .Anything ).Return ([]byte ("/usr/dir/lib/R/x86_64/4.4/library/renv" ), nil , nil )
703
- executor .On ("RunCommand" , "/usr/bin/R" , []string {"-s" , "-e" , "renv::status()" }, mock .Anything , mock .Anything ).Return (renvStatusOutput , nil , nil )
702
+ executor .On ("RunCommand" , mock . Anything , []string {"-s" , "-e" , "cat(system.file(package = \" renv\" ))" }, mock .Anything , mock .Anything ).Return ([]byte ("/usr/dir/lib/R/x86_64/4.4/library/renv" ), nil , nil )
703
+ executor .On ("RunCommand" , mock . Anything , []string {"-s" , "-e" , "renv::status()" }, mock .Anything , mock .Anything ).Return (renvStatusOutput , nil , nil )
704
704
705
705
i , _ := NewRInterpreter (s .cwd , util.Path {}, log , executor , nil , nil )
706
706
interpreter := i .(* defaultRInterpreter )
0 commit comments