Reduce chmod
This commit is contained in:
parent
b2429da437
commit
664f089985
3 changed files with 12 additions and 46 deletions
|
@ -9,27 +9,13 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
public class Chmod : ToolTask
|
||||
{
|
||||
[Required]
|
||||
public string File { get; set; }
|
||||
public string Glob { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Mode { get; set; }
|
||||
|
||||
public bool Recursive { get; set; }
|
||||
|
||||
protected override bool ValidateParameters()
|
||||
{
|
||||
base.ValidateParameters();
|
||||
|
||||
if (!System.IO.File.Exists(File))
|
||||
{
|
||||
Log.LogError($"File '{File} does not exist.");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override string ToolName
|
||||
{
|
||||
get { return "chmod"; }
|
||||
|
@ -47,12 +33,12 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
protected override string GenerateCommandLineCommands()
|
||||
{
|
||||
return $"{GetRecursive()} {GetMode()} {GetFilePath()}";
|
||||
return $"{GetRecursive()} {GetMode()} {GetGlob()}";
|
||||
}
|
||||
|
||||
private string GetFilePath()
|
||||
private string GetGlob()
|
||||
{
|
||||
return File;
|
||||
return Glob;
|
||||
}
|
||||
|
||||
private string GetMode()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue