Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Force the project name to a string or path.resolve will ignore it later. #1890

Merged
merged 1 commit into from

2 participants

@Ryanl92

Without this exports with only digits in their name cannot be exported as path.resolve ignores non-string arguments are ignored [http://nodejs.org/api/path.html#path_path_resolve_from_to]

This just forces the argument to a string when it is read from the command line.
Without this the error occurs at models/Project.server.bones:164.

@Ryanl92 Ryanl92 Force the project name to a string or path.resolve will ignore it later.
Without this exports with only digits in their name cannot be exported
430cbc3
@springmeyer
Owner

Nice catch. I was able to replicate as well.

@springmeyer springmeyer merged commit 9cd5c6f into mapbox:master
@Ryanl92 Ryanl92 deleted the Ryanl92:integer-export-fix branch
@springmeyer springmeyer referenced this pull request from a commit
@springmeyer springmeyer amend #1890 to ensure that if no argument is passed on the command li…
…ne then we still get proper usage rather than a toString exception
804dfca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 29, 2013
  1. @Ryanl92

    Force the project name to a string or path.resolve will ignore it later.

    Ryanl92 authored
    Without this exports with only digits in their name cannot be exported
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  commands/export.bones
View
2  commands/export.bones
@@ -104,7 +104,7 @@ command.prototype.initialize = function(plugin, callback) {
if (process.env.tilemillConfig)
_(opts).extend(JSON.parse(process.env.tilemillConfig));
opts.files = path.resolve(opts.files);
- opts.project = plugin.argv._[1];
+ opts.project = plugin.argv._[1].toString();
var export_filename = plugin.argv._[2];
if (!export_filename) return plugin.help();
opts.filepath = path.resolve(export_filename.replace(/^~/,process.env.HOME));
Something went wrong with that request. Please try again.