Commits

Jens Alfke committed 9332115

Two tweaks to HgOperation:
* Set HGPLAIN environment var to disable any custom formatting like ANSI colors which might confuse Murky.
* Prepend the "-y" (aka --noninteractive) flag so hg knows it can't prompt for user input.

  • Participants
  • Parent commits b5463b4

Comments (0)

Files changed (1)

Source/HgOperation.m

     // some language has to be specified there or the variable doesn't do anything.
     [sEnvironment setObject: @"en_US.UTF-8" forKey: @"LANG"];
 
+    // Disable any custom formatting (like ANSI color) specified in user's .hgrc:
+    [sEnvironment setObject: @"" forKey: @"HGPLAIN"];
+
     // hg may need a custom PYTHONPATH. If so, the user's shell will set up that variable, so
     // to get it, fire up a shell and ask it:
     NSString *pythonPath = runShell(@"echo $PYTHONPATH", NULL);
 
 - (NSTask*) createTask
 {
-    [self prependArguments: _subcommand,nil];
+    [self prependArguments: _subcommand, @"-y", nil];       // -y means "noninteractive mode"
     NSTask *task = [super createTask];
     task.environment = sEnvironment;
     return task;