Skip to content

Commit

Permalink
Clear npm cache as well, use $this->parameters to get the correct $HO…
Browse files Browse the repository at this point in the history
…ME directory
  • Loading branch information
dennisxrow committed Mar 13, 2018
1 parent bb46667 commit e5df709
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/xrow/eZCluster/Resources/environment.php
Expand Up @@ -475,9 +475,12 @@ public function setup()
$fs->remove( $this->dir . ".new" );
}

# Clear composer cache to save some space when building a Docker image
# Clear composer and npm cache to save some space when building a Docker image
if(file_exists("/.dockerenv")) {
$this->run("composer clear-cache");
if(file_exists("/usr/bin/npm")) {
$this->run("npm cache clear", $this->parameters);
}
$this->run("composer clear-cache", $this->parameters);
}
}

Expand Down

0 comments on commit e5df709

Please sign in to comment.