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

pbcopy #7

Closed
thephred opened this issue Mar 2, 2010 · 3 comments
Closed

pbcopy #7

thephred opened this issue Mar 2, 2010 · 3 comments

Comments

@thephred
Copy link

thephred commented Mar 2, 2010

I'm having trouble with the http://github.com/defunkt/gist/commit/8e80c386206a8e997dcf094bc78ae366b83d9845 commit. It changed:
system("which pbcopy > /dev/null")
to:
system("which pbcopy &> /dev/null")

On my system this produces a error:
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31: command not found: pbcopy

I do not have pbcopy and system("which pbcopy > /dev/null") returns false, whereas system("which pbcopy &> /dev/null") returns true (I believe incorrectly).

@defunkt
Copy link
Owner

defunkt commented Mar 2, 2010

Whoops, weird. Gonna revert for now.

@rtomayko
Copy link

rtomayko commented Mar 2, 2010

type(1) is a bit more portable than which(1). Also, I think &> is a bashism.

@defunkt
Copy link
Owner

defunkt commented Mar 2, 2010

Sweet!

ConradIrwin added a commit to ConradIrwin/gist that referenced this issue May 3, 2013
The issue was that Net::HTTP sets the default content-type to
application/x-www-form-encoded, which caused GitHub's servers to
percent-decode the incoming content.

This meant that if a file contained a % that was not followed by two hex
digits, you could not upload a gist. Setting the right content-type
header fixes this.

Thanks to @rking for the data to replicate this problem.
This issue was closed.
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

3 participants