-
Notifications
You must be signed in to change notification settings - Fork 11
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
Output Contains Control Characters #25
Comments
Thanks for reporting this. At glance it looks like a weird unicode issue. Perhaps with the loading state? Feel free to send a PR if you're willing to. I will work on this whenever I have some time. |
You're probably right, seems like unicode. I jumped the gun and assumed they were control characters. I can take a look at it when I have some time. 😄 |
Just from a quick glance, could it be from the loading components? If so, perhaps removing that or adding the ability to disable it (via a flag) would be a good solution. Lines 63 to 68 in b4fab2f
|
I was trying to use jq with this: |
Hi, const { promisify } = require('util');
const util = require('util');
const exec = util.promisify(require('child_process').exec);
async function getLocation() {
const { stdout } = await exec('whereami -f json');
return stdout
}
const coord = await getLocation()
const latitude = coord.latitude
const longitude = coord.longitude but when I receive coord has this format and I can't access json: I also tried to add noanim as "whereami -f json -n" but with no luck. |
I added -noanim on my own fork, so it's not part of this repository. You can use this if you want: https://github.com/mwnDK1402/whereami |
That made the trick! I've been able to install your package through npm install -g mwnDK1402/whereami and parsing the response to json with JSON.parse(). I hope this fork will be integrated soon into repo. |
Output, regardless of format, contains unnecessary control characters.
Example:
The text was updated successfully, but these errors were encountered: