Skip to content

Commit

Permalink
Forgot to add note when there is task to do...
Browse files Browse the repository at this point in the history
  • Loading branch information
AkosLukacs authored and drusellers committed Mar 31, 2012
1 parent e4191cb commit 842d4b3
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions product/dropkick/Tasks/Files/ExistsTasks.cs
Expand Up @@ -27,37 +27,45 @@ public class ExistsTask : Task {
var result = new DeploymentResult();

if(_filesShouldExist.Count > 0) {
bool fErr = false;
foreach(var filePath in _filesShouldExist) {
string actualPath = _path.GetFullPath(filePath);
if(!_path.IsFile(filePath)) { result.AddError("'{0}' is not an acceptable path. It doesn't appear to be a file.".FormatWith(filePath)); }
if(!_path.IsFile(filePath)) { fErr = true; result.AddError("'{0}' is not an acceptable path. It doesn't appear to be a file.".FormatWith(filePath)); }
}
if(!fErr) { result.AddNote("{0} files that should exist.".FormatWith(_filesShouldExist.Count)); }
} else {
result.AddNote("No Files that should exist.");
}

if(_directoriesShouldExist.Count > 0) {
bool dErr = false;
foreach(var dirPath in _directoriesShouldExist) {
string actualPath = _path.GetFullPath(dirPath);
if(!_path.IsDirectory(dirPath)) { result.AddError("'{0}' is not an acceptable path. It doesn't appear to be a directory.".FormatWith(dirPath)); }
if(!_path.IsDirectory(dirPath)) { dErr = true; result.AddError("'{0}' is not an acceptable path. It doesn't appear to be a directory.".FormatWith(dirPath)); }
}
if(!dErr) { result.AddNote("{0} directories that should exist.".FormatWith(_directoriesShouldExist.Count)); }
} else {
result.AddNote("No Directories that should exist.");
}

if(_filesShould_NOT_Exist.Count > 0) {
bool fnErr = false;
foreach(var filePath in _filesShould_NOT_Exist) {
string actualPath = _path.GetFullPath(filePath);
if(!_path.IsFile(filePath)) { result.AddError("'{0}' is not an acceptable path. It doesn't appear to be a file.".FormatWith(filePath)); }
if(!_path.IsFile(filePath)) { fnErr = true; result.AddError("'{0}' is not an acceptable path. It doesn't appear to be a file.".FormatWith(filePath)); }
}
if(!fnErr) { result.AddNote("{0} files that should not exist.".FormatWith(_filesShould_NOT_Exist.Count)); }
} else {
result.AddNote("No Files that should not exist.");
}

if(_directoriesShould_NOT_Exist.Count > 0) {
bool dnErr = false;
foreach(var dirPath in _directoriesShould_NOT_Exist) {
string actualPath = _path.GetFullPath(dirPath);
if(!_path.IsDirectory(dirPath)) { result.AddError("'{0}' is not an acceptable path. It doesn't appear to be a directory.".FormatWith(dirPath)); }
if(!_path.IsDirectory(dirPath)) { dnErr = true; result.AddError("'{0}' is not an acceptable path. It doesn't appear to be a directory.".FormatWith(dirPath)); }
}
if(!dnErr) { result.AddNote("{0} directories that should not exist.".FormatWith(_directoriesShould_NOT_Exist.Count)); }
} else {
result.AddNote("No Directories that should not exist.");
}
Expand Down

0 comments on commit 842d4b3

Please sign in to comment.