jenkins-zh/jenkins-cli

URLEncode project names passed to commands

Opened this issue · 2 comments

Is your feature request related to a problem? Please describe.
When a job has spaces in its name, jcli cannot reference it appropriately even when quoted:

jcli job history 'ArchLinux Public Package Builder'
Error: not found resources

The reference does pass when pre-encoded by the user as jcli job history ArchLinux%20Public%20Package%20Builder

Describe the solution you'd like
Rewriting spaces and special chars to comply with URL encoding inline by the client should address the issue transparently

yJunS commented

@sempervictus You can try jcli job history "/job/ArchLinux Public Package Builder"

yJunS commented

If your item's name has space, use /job/[item name] can query