From 220470d3721012b8b3fd6042cf652eefef735cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Thu, 4 Aug 2011 15:01:07 -0400 Subject: [PATCH] fix exporting in the os x app while maintaining compatibility with the ubuntu node ppa --- index.js | 5 +++++ models/Exports.server.bones | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index ed2644936..3e06fa33b 100755 --- a/index.js +++ b/index.js @@ -1,6 +1,11 @@ #!/usr/bin/env node process.title = 'tilemill'; +// This is necessary to make optimist not special-case into coffeescript as +// certain node installs (e.g. ubuntu node ppa) do not use `node` as the binary +// name. +process.argv[0] = 'node'; + require('tilelive-mapnik').registerProtocols(require('tilelive')); require('mbtiles').registerProtocols(require('tilelive')); diff --git a/models/Exports.server.bones b/models/Exports.server.bones index 951ca865d..4a7cd3d99 100644 --- a/models/Exports.server.bones +++ b/models/Exports.server.bones @@ -15,10 +15,7 @@ var start = function(model, data, callback) { // nice the export process. args.push('-n19'); // node command - // @TODO note that process.execPath is not used here as certain - // installs (e.g. ubuntu node ppa) do not use `node` as the binary - // name causing optimist arg parsing to fail. - args.push('node'); + args.push(process.execPath); // tilemill index.js args.push(path.resolve(path.join(__dirname + '/../index.js'))); // export command