Skip to content
This repository was archived by the owner on Feb 18, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Dashbrew/Cli/Tasks/ConfigDefaultsTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function run() {
};
}

$fs->mkdir($config_sources_dirs, 0777, 'vagrant');
$fs->mkdir($config_sources_dirs);

foreach ($config_files as $file){
if(empty($file['default'])){
Expand All @@ -59,7 +59,7 @@ public function run() {
$origin_file = $file['default'];
if(!file_exists($target_file)){
$this->output->writeInfo("Writing default config file '$target_file'");
$fs->copy($origin_file, $target_file, true, 'vagrant');
$fs->copy($origin_file, $target_file, true);
}
}

Expand All @@ -75,15 +75,15 @@ public function run() {
}

$this->output->writeInfo("Writing default config dir '$target_dir'");
$fs->mkdir($target_dir, 0777, 'vagrant');
$fs->mkdir($target_dir);
$finder = new Finder;
foreach($finder->files()->in($source_dir)->ignoreDotFiles(false)->depth('== 0') as $origin_dir_file){
$origin_dir_filename = $origin_dir_file->getFilename();

$target_dir_filepath = $target_dir . '/' . $origin_dir_filename;
$origin_dir_filepath = $source_dir . '/' . $origin_dir_filename;

$fs->copy($origin_dir_filepath, $target_dir_filepath, true, 'vagrant');
$fs->copy($origin_dir_filepath, $target_dir_filepath, true);
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/Dashbrew/Cli/Tasks/ConfigSyncTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected function syncFiles() {
}

$this->output->writeInfo("Syncing config file '$source_file' " . ($copy_from == $source_file ? "->" : "<-" ) . " '$target_file'");
$fs->copy($copy_from, $copy_to, true, $copy_owner, $copy_group);
$fs->copy($copy_from, $copy_to, true);
}
}

Expand Down Expand Up @@ -156,7 +156,7 @@ protected function syncDirs() {
}

$this->output->writeInfo("Syncing config file '$source_dir_filepath' " . ($copy_from == $source_dir_filepath ? "->" : "<-" ) . " '$target_dir_filepath'");
$fs->copy($copy_from, $copy_to, true, $copy_owner, $copy_group);
$fs->copy($copy_from, $copy_to, true);
}
// Delete file from source dir
else if(in_array($source_dir_filename, $dir_sync_status['old'])){
Expand All @@ -168,7 +168,7 @@ protected function syncDirs() {
$dir_sync_status['new'][] = $source_dir_filename;

$this->output->writeInfo("Copying config file '$source_dir_filepath' -> '$target_dir_filepath'");
$fs->copy($source_dir_filepath, $target_dir_filepath, true, $target_dir_owner, $target_dir_group);
$fs->copy($source_dir_filepath, $target_dir_filepath, true);
}
}

Expand All @@ -191,7 +191,7 @@ protected function syncDirs() {
// Copy file to source dir
else {
$this->output->writeInfo("Copying config file '$source_dir_filepath' <- '$target_dir_filepath'");
$fs->copy($target_dir_filepath, $source_dir_filepath, true, $source_dir_owner, $source_dir_group);
$fs->copy($target_dir_filepath, $source_dir_filepath, true);

$dir_sync_status['new'][] = $target_dir_filename;
}
Expand All @@ -202,6 +202,6 @@ protected function syncDirs() {

// Write status file
$this->output->writeDebug("Writing config directories sync status file");
$fs->write(self::SYNC_STATUS_FILE, json_encode($sync_status_new), 'vagrant');
$fs->write(self::SYNC_STATUS_FILE, json_encode($sync_status_new));
}
}
2 changes: 1 addition & 1 deletion src/Dashbrew/Cli/Util/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public static function writeOld() {
return;
}

$fs->copy(self::CONFIG_FILE, self::CONFIG_FILE_OLD, true, 'vagrant');
$fs->copy(self::CONFIG_FILE, self::CONFIG_FILE_OLD, true);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/Dashbrew/Cli/Util/Projects.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public static function writeCatalog($catalog) {
$content = json_encode($catalog);
if(!file_exists($file) || md5($content) !== md5_file($file)){
$fs = Util::getFilesystem();
$fs->write($file, $content, 'vagrant');
$fs->write($file, $content);
return true;
}

Expand All @@ -168,7 +168,7 @@ public static function writeHosts($hosts) {
$content = json_encode($hosts);
if(!file_exists($file) || md5($content) !== md5_file($file)){
$fs = Util::getFilesystem();
$fs->write($file, $content, 'vagrant');
$fs->write($file, $content);
return true;
}

Expand All @@ -187,7 +187,7 @@ public static function writeShortcuts($shortcuts) {
$content = json_encode($shortcuts);
if(!file_exists($file) || md5($content) !== md5_file($file)){
$fs = Util::getFilesystem();
$fs->write($file, $content, 'vagrant');
$fs->write($file, $content);
return true;
}

Expand Down