File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
src/Atata.Cli.HtmlValidate Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212- Upgrade ` Atata.Cli ` package to v1.2.0.
1313- Upgrade ` Atata.Cli.Npm ` package to v1.2.0.
1414
15+ ## Fixed
16+
17+ - Fix ` HtmlValidateCli.GetInstalledVersion() ` method to return ` null ` when the package is not installed.
18+
1519## [ 1.1.0] - 2021-07-13
1620
1721### Added
Original file line number Diff line number Diff line change @@ -82,7 +82,14 @@ private string ReadOutputFromFile(string filePath)
8282 return File . ReadAllText ( fullFilePath ) ;
8383 }
8484
85- public override string GetInstalledVersion ( ) =>
86- Execute ( "--version" ) . Output . Split ( '-' ) . Last ( ) ;
85+ /// <inheritdoc cref="GlobalNpmPackageCli{TCli}.GetInstalledVersion"/>
86+ public override string GetInstalledVersion ( )
87+ {
88+ CliCommandResult versionCommandResult = ExecuteRaw ( "--version" ) ;
89+
90+ return versionCommandResult . HasError
91+ ? null
92+ : versionCommandResult . Output . Split ( '-' ) . Last ( ) ;
93+ }
8794 }
8895}
You can’t perform that action at this time.
0 commit comments