Skip to content

Commit 6e8c12b

Browse files
committed
Make app support work on windows paths
1 parent 8741a03 commit 6e8c12b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

command/record_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ func TestRecordApp(t *testing.T) {
255255
t.Errorf("gtm record(%+v), want 0 got %d, %s", args, rc, ui.ErrorWriter)
256256
}
257257

258-
if _, err := os.Stat(filepath.Join(workdir, ".gtm/browser.app")); os.IsNotExist(err) {
258+
if _, err := os.Stat(filepath.Join(workdir, ".gtm", "browser.app")); os.IsNotExist(err) {
259259
t.Errorf("gtm record(%+v), want .app file to be created, it was not created", args)
260260
}
261261

project/project.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var (
2727
// ErrFileNotFound is raised when record an event for a file that does not exist
2828
ErrFileNotFound = errors.New("File does not exist")
2929
// AppEventFileContentRegex regex for app event files
30-
AppEventFileContentRegex = regexp.MustCompile(`\.gtm/(?P<appName>.*)\.app`)
30+
AppEventFileContentRegex = regexp.MustCompile(`\.gtm[\\/](?P<appName>.*)\.app`)
3131
)
3232

3333
var (

0 commit comments

Comments
 (0)