@@ -73,14 +73,14 @@ protected function execute(InputInterface $input, OutputInterface $output) {
7373 $ this ->io ->comment (sprintf ('Checking out %s (%s) on %s ' ,
7474 $ this ->siteName ,
7575 $ this ->ref ,
76- $ this ->root
76+ $ this ->getRoot ()
7777 ));
7878
7979 switch ($ this ->repo ['type ' ]) {
8080 case 'git ' :
8181 // Check if repo exists and has any changes.
82- if ($ this ->fileExists ($ this ->root ) &&
83- $ this ->fileExists ($ this ->root . '. ' . $ this ->repo ['type ' ])
82+ if ($ this ->fileExists ($ this ->getRoot () ) &&
83+ $ this ->fileExists ($ this ->getRoot () . '. ' . $ this ->repo ['type ' ])
8484 ) {
8585 if ($ input ->hasOption ('force ' ) &&
8686 !$ input ->getOption ('force ' )
@@ -133,7 +133,7 @@ protected function validateRepo() {
133133 protected function gitDiff () {
134134 $ command = sprintf (
135135 'cd %s && git diff-files --name-status -r --ignore-submodules ' ,
136- $ this ->shellPath ($ this ->root )
136+ $ this ->shellPath ($ this ->getRoot () )
137137 );
138138
139139 $ shellProcess = $ this ->getShellProcess ();
@@ -143,7 +143,7 @@ protected function gitDiff() {
143143 $ message = sprintf ('You have uncommitted changes on %s ' . PHP_EOL .
144144 'Please commit or revert your changes before checking out the site. ' . PHP_EOL .
145145 'If you want to wipe your local changes use --force. ' ,
146- $ this ->root
146+ $ this ->getRoot ()
147147 );
148148 throw new CommandException ($ message );
149149 }
@@ -165,14 +165,14 @@ protected function gitDiff() {
165165 protected function gitClone () {
166166 $ command = sprintf ('git clone %s %s ' ,
167167 $ this ->repo ['url ' ],
168- $ this ->shellPath ($ this ->root )
168+ $ this ->shellPath ($ this ->getRoot () )
169169 );
170170 $ this ->io ->commentBlock ($ command );
171171
172172 $ shellProcess = $ this ->getShellProcess ();
173173
174174 if ($ shellProcess ->exec ($ command , TRUE )) {
175- $ this ->io ->success (sprintf ('Repo cloned on %s ' , $ this ->root ));
175+ $ this ->io ->success (sprintf ('Repo cloned on %s ' , $ this ->getRoot () ));
176176 }
177177 else {
178178 throw new CommandException ($ shellProcess ->getOutput ());
@@ -193,10 +193,10 @@ protected function gitClone() {
193193 */
194194 protected function gitCheckout () {
195195 $ commands = [
196- sprintf ('cd %s ' , $ this ->shellPath ($ this ->root )),
196+ sprintf ('cd %s ' , $ this ->shellPath ($ this ->getRoot () )),
197197 'git fetch --all ' ,
198- sprintf ('chmod 777 %ssites/default ' , $ this ->webRoot ),
199- sprintf ('chmod 777 %ssites/default/settings.php ' , $ this ->webRoot ),
198+ sprintf ('chmod 777 %ssites/default ' , $ this ->getWebRoot () ),
199+ sprintf ('chmod 777 %ssites/default/settings.php ' , $ this ->getWebRoot () ),
200200 sprintf ('git checkout %s --force ' , $ this ->ref ),
201201 ];
202202 $ command = implode (' && ' , $ commands );
@@ -220,10 +220,10 @@ protected function gitCheckout() {
220220 * @return mixed
221221 */
222222 protected function getCurrentRef () {
223- if ($ this ->fileExists ($ this ->root )) {
223+ if ($ this ->fileExists ($ this ->getRoot () )) {
224224 // Get branch from site directory.
225225 $ command = sprintf ('cd %s && git branch ' ,
226- $ this ->shellPath ($ this ->root )
226+ $ this ->shellPath ($ this ->getRoot () )
227227 );
228228
229229 $ shellProcess = $ this ->getShellProcess ()->printOutput (FALSE );
0 commit comments