-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-Authored-By: Ilyas Landikov <[email protected]>
- Loading branch information
Showing
1 changed file
with
16 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,25 @@ | ||
'use strict'; | ||
|
||
var autils = require('../../AUtils'); | ||
var GenericDiffReporterBase = require('../GenericDiffReporterBase'); | ||
var shelljs = require('shelljs'); | ||
var osTools = require('../../osTools'); | ||
import GenericDiffReporterBase from '../GenericDiffReporterBase'; | ||
import * as shelljs from 'shelljs'; | ||
import {platform} from "../../osTools"; | ||
import {searchForExecutable} from "../../AUtils"; | ||
|
||
class Reporter extends GenericDiffReporterBase { | ||
|
||
constructor() { | ||
constructor() { | ||
super("DiffMerge"); | ||
|
||
super("DiffMerge"); | ||
let app: string | null = null; | ||
if (platform.isMac) { | ||
try { | ||
app = shelljs.ls('/Applications/DiffMerge.app/Contents/MacOS/DiffMerge')[0]; | ||
} catch (err) { | ||
console.error(err); | ||
} | ||
} | ||
|
||
var app = null; | ||
if (osTools.platform.isMac) { | ||
try { | ||
app = shelljs.ls('/Applications/DiffMerge.app/Contents/MacOS/DiffMerge')[0]; | ||
} catch (err) { | ||
console.error(err); | ||
} | ||
this.exePath = app || searchForExecutable("DiffMerge"); | ||
} | ||
|
||
this.exePath = app || autils.searchForExecutable("DiffMerge"); | ||
|
||
} | ||
|
||
} | ||
|
||
module.exports = Reporter; | ||
export = Reporter; |