mapbox / mapbox/logbt

Doesn't handle spaces in arguments correctly

Open
#46 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
25
Forks
7
PR merge metrics
No merged PRs in 30d

Description

I'm not certain if this is logbt's fault or my knowledge of Bash quoting is off, but, here's the command I'm trying to debug:

tippecanoe --output=mbtiles/parcels.mbtiles --force --read-parallel --minimum-zoom=13 --maximum-zoom=15 --generate-ids --simplification=10 --simplify-only-low-zooms --attribute-type='ATTOM ID:int' --include='ATTOM ID' --include=APN --include=CountyFIPS --coalesce-smallest-as-needed --base-zoom=14 --accumulate-attribute=APN:comma --accumulate-attribute='ATTOM ID:comma' --layer=parcels data/parcels.json

when I run with logbt:

~/logbt/logbt -- tippecanoe --output=mbtiles/parcels.mbtiles --force --read-parallel --minimum-zoom=13 --maximum-zoom=15 --generate-ids --simplification=10 --simplify-only-low-zooms --attribute-type='ATTOM ID:int' --include='ATTOM ID' --include=APN --include=CountyFIPS --coalesce-smallest-as-needed --base-zoom=14 --accumulate-attribute=APN:comma --accumulate-attribute='ATTOM ID:comma' --layer=parcels data/parcels.json
[logbt] using corefile location: /tmp/logbt-coredumps
[logbt] using core_pattern: core.%p.%E
-TATTOM option must be in the form -Tname:type
[logbt] saw 'tippecanoe' exit with code:1 (HUP)

That is, logbt seems to be failing to quote the arguments that contain spaces (ie, --include='ATTOM ID').

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported logbt invocation with the --include='ATTOM ID' and --attribute-type='ATTOM ID:int' arguments. Start by inspecting how logbt forwards command-line arguments, then verify that spaces remain within one argument when tippecanoe runs. Done means the command reaches tippecanoe without the -TATTOM parsing error.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.