Skip to content
This repository was archived by the owner on Nov 7, 2019. It is now read-only.

Commit 5b6217f

Browse files
kant2002stajs
authored andcommitted
The ability to provide relative paths to --specflow-path (#51)
1 parent 781765b commit 5b6217f

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/SpecFlow.NetCore/Fixer.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,15 @@ private string FindSpecFlow(string path)
3030
if (File.Exists(path))
3131
return path;
3232

33-
throw new Exception("Path to SpecFlow was supplied as an argument, but doesn't exist: " + path);
33+
if (Path.IsPathRooted(path))
34+
{
35+
throw new Exception("Path to SpecFlow was supplied as an argument, but doesn't exist: " + path);
36+
}
3437
}
3538

36-
const string relativePathToSpecFlow = @"SpecFlow\2.1.0\tools\specflow.exe";
37-
39+
var relativePathToSpecFlow = string.IsNullOrWhiteSpace(path)
40+
? @"SpecFlow\2.1.0\tools\specflow.exe"
41+
: path;
3842
var nugetPackagesPath = Environment.GetEnvironmentVariable("NUGET_PACKAGES");
3943

4044
if (!string.IsNullOrWhiteSpace(nugetPackagesPath))

src/SpecFlow.NetCore/SpecFlow.NetCore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<Description>Generate tests from SpecFlow feature files inside ASP.NET Core projects (.xproj's).</Description>
5-
<VersionPrefix>1.0.0-rc9-00004</VersionPrefix>
5+
<VersionPrefix>1.0.0-rc9-00005</VersionPrefix>
66
<Authors>stajs</Authors>
77
<TargetFrameworks>netcoreapp1.0;net46;net461</TargetFrameworks>
88
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64</RuntimeIdentifiers>

0 commit comments

Comments
 (0)