Mercurial > psgxs
diff backends/file.js @ 43:023f767662d3
Fix compatibility with strict mode of node 0.4 and some files without licence header.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 01 Mar 2011 11:58:15 +0100 |
parents | e007a6364bf0 |
children | 99bd1d1ac071 |
line wrap: on
line diff
--- a/backends/file.js +++ b/backends/file.js @@ -17,6 +17,8 @@ * along with PSĜS. If not, see <http://www.gnu.org/licenses/>. */ +'use strict'; + var fs = require('fs'); var Node = require('../nodes').Node; var backend = exports; @@ -82,7 +84,7 @@ backend.load = function(file) { if (err) fs.writeFileSync(file, '{}'); else if (!stats.isFile()) { - console.log('\033[1;41mThe file “' + file + '” isn’t a regular file. Exiting.\033[0m'); + console.log('\x1b[1;41mThe file “' + file + '” isn’t a regular file. Exiting.\x1b[0m'); process.exit(1); }