Mercurial > hg > graal-compiler
diff mxtool/mx.py @ 8138:1446b04e4148
'mx fsckprojects' should only ask on a tty
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Wed, 06 Mar 2013 23:00:44 +0100 |
parents | 6e3ebc6fd5a4 |
children | 67d654d9ee9a 0934903d28f3 |
line wrap: on
line diff
--- a/mxtool/mx.py Wed Mar 06 21:59:06 2013 +0100 +++ b/mxtool/mx.py Wed Mar 06 23:00:44 2013 +0100 @@ -2557,8 +2557,7 @@ projectConfigFiles = frozenset(['.classpath', 'nbproject']) indicators = projectConfigFiles.intersection(files) if len(indicators) != 0: - response = raw_input(currentDir + ' looks like a removed project -- delete it? [yn]: ') - if 'y' == response: + if not sys.stdout.isatty() or raw_input(currentDir + ' looks like a removed project -- delete it? [yn]: ') == 'y': shutil.rmtree(currentDir) log('Deleted ' + currentDir)