Skip to content

Commit

Permalink
Fix incorrect detection of unsupported terminals
Browse files Browse the repository at this point in the history
Small change
  • Loading branch information
shreyashsaitwal committed Mar 18, 2021
1 parent 5ae0c7b commit 2671e25
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions lib/commands/build_command/build_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ class BuildCommand extends Command with AppDataMixin, CopyMixin {
PrintArt();

final scriptPath = Platform.script.toFilePath(windows: Platform.isWindows);
if (scriptPath.startsWith(_cd)) {

if (scriptPath == p.join(_cd, 'rush')) {
PrintMsg(
' Uh, oh! Looks like you\'re using an unsupported terminal. Please try ',
' Uh, oh! Looks like you\'re using an unsupported terminal. Please try using another terminal.',
ConsoleColor.red);
exit(64);
}
Expand Down Expand Up @@ -256,13 +257,17 @@ class BuildCommand extends Command with AppDataMixin, CopyMixin {
await buildBox.put('count', i);
}

await _compile(pathToAntEx, args,
areFilesModified || await buildBox.get('count') == 1, buildBox, optimize);
await _compile(
pathToAntEx,
args,
areFilesModified || await buildBox.get('count') == 1,
buildBox,
optimize);
}

/// Compiles all the Java files located at _cd/src.
Future<void> _compile(
String antPath, AntArgs args, bool shouldRecompile, Box box, bool optimize) async {
Future<void> _compile(String antPath, AntArgs args, bool shouldRecompile,
Box box, bool optimize) async {
var errCount = 0;
var warnCount = 0;

Expand Down

0 comments on commit 2671e25

Please sign in to comment.