- Corrected code-smell and code style issues in \ncc\Classes > BashExtension > BashRunner
This commit is contained in:
parent
d4709443f7
commit
84e5e5a346
2 changed files with 7 additions and 3 deletions
|
@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Corrected code-smell and code style issues in `\ncc\Classes > HttpClient`
|
- Corrected code-smell and code style issues in `\ncc\Classes > HttpClient`
|
||||||
- Corrected code-smell and code style issues in `\ncc\Classes > GitClient`
|
- Corrected code-smell and code style issues in `\ncc\Classes > BashExtension > BashRunner`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,13 +36,17 @@ namespace ncc\Classes\BashExtension;
|
||||||
*/
|
*/
|
||||||
public static function processUnit(string $path, ExecutionPolicy $policy): ExecutionUnit
|
public static function processUnit(string $path, ExecutionPolicy $policy): ExecutionUnit
|
||||||
{
|
{
|
||||||
$execution_unit = new ExecutionUnit();
|
|
||||||
if(!file_exists($path) && !is_file($path))
|
if(!file_exists($path) && !is_file($path))
|
||||||
|
{
|
||||||
throw new FileNotFoundException($path);
|
throw new FileNotFoundException($path);
|
||||||
$policy->Execute->Target = null;
|
}
|
||||||
|
|
||||||
|
$execution_unit = new ExecutionUnit();
|
||||||
$execution_unit->ExecutionPolicy = $policy;
|
$execution_unit->ExecutionPolicy = $policy;
|
||||||
$execution_unit->Data = IO::fread($path);
|
$execution_unit->Data = IO::fread($path);
|
||||||
|
|
||||||
|
$policy->Execute->Target = null;
|
||||||
|
|
||||||
return $execution_unit;
|
return $execution_unit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue