Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--log-level param in ti_args breaks the build #16

Open
shodanuk opened this issue Jun 3, 2015 · 1 comment
Open

--log-level param in ti_args breaks the build #16

shodanuk opened this issue Jun 3, 2015 · 1 comment

Comments

@shodanuk
Copy link

shodanuk commented Jun 3, 2015

Running grunt dev -p ios with:

var ti_args= {
  ios: ["-p","ios","-T", "simulator", "--device-id","xxx-xxx-xxx-xxx-xxx", "--log-level", "trace"]
};

results in:

[INFO] Alloy compiled in 1.44946s
[WARN] Nothing to update.
titanium build --log-level info --platform ios --project-dir . --no-banner --no-progress-bars --no-prompt -p ios -T simulator --device-id 1483CA77-1291-43A7-A246-F2F6E8C15FC8 --log-level trace --appify
[ERROR] Invalid "--log-level" value "info,trace"

Accepted values:
   trace
   debug
   info
   warn
   error

For help, run: titanium help build


Done, without errors.

Something (I suspect grunt-titanium) is adding --log-level info by default.

Not sure if the problem is JAST or over at grunt-titanium.

@shodanuk
Copy link
Author

shodanuk commented Jun 3, 2015

Same goes for grunt dev -p android.

I've done a bit of digging and it appears that grunt-titanium doesn't actually merge in anything passed in the args param of the grunt task definition but simply concatenates it to the end of the generated ti command, resulting in duplicate --platform & --log-level params if they've been specified in ti_args.

The defaults in grunt-titanium only specify platform, log-level & projectDir, hence why the problem only exists for select params.

See https://github.com/tonylukasavage/grunt-titanium/blob/master/tasks/titanium.js#L157

A fairly simple fix for the platform param is to pass the grunt -p param into a new platform param in the grunt task definition.

Will put together a pull request in a sec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant