Jack Nagel
b03faffcc1
Remove unused argument
2015-03-14 17:59:06 -04:00
Jack Nagel
04f600bb50
Emit warning when no editor is set
...
Closes Homebrew/homebrew#34647 .
2015-01-05 15:23:35 -05:00
Mike McQuaid
dc16371e19
utils: install_gem_setup_path! now checks PATH.
...
Check the executable is present to give a better error message if it isn't.
Closes Homebrew/homebrew#35541 .
2015-01-05 19:14:55 +00:00
Jack Nagel
a52143c63c
Remove readline and zlib hacks
2015-01-03 22:39:07 -05:00
Mike McQuaid
39fb39288f
utils: always set PATH in install_gem_setup_path.
2015-01-02 14:13:32 +00:00
Mike McQuaid
167dac74b7
utils: tweak install_gem_setup_path to not warn.
...
If the `Gem.user_dir/bin` is not already in the PATH it'll complain
unnecessarily (as we add it to the PATH ourselves) so just add it to the
PATH before running the install.
2015-01-02 13:37:06 +00:00
Mike McQuaid
9e8103cf38
Add Homebrew.install_gem_setup_path! function.
...
This uses the logic from tests.rb in man.rb too so that this can be
shared in a few places.
2015-01-02 12:42:02 +00:00
Mike McQuaid
645e82df83
Remove {start,stop}doc as we're using Yard now.
2014-12-06 09:14:20 +00:00
Jack Nagel
6f6484f0d8
Friendlier error message for EOFError raised inside Net::HTTP
...
Closes Homebrew/homebrew#34312 .
Closes Homebrew/homebrew#34358 .
2014-11-20 22:28:11 -06:00
Tim D. Smith
facb82e4bc
Shows time since last commit in brew config
...
Closes Homebrew/homebrew#32936 .
2014-10-05 16:17:57 -07:00
Mike McQuaid
05739585d1
Generate RDoc documentation.
...
This is currently still very messy and we probably want to work out the
best way to declare what parts of our DSL/what files are "public".
Still, even if this is a WIP I'd rather get something committed sooner
rather than later and start iterating on this as a replacement for
`example_formula.rb` and the formula cookbook.
To test:
```bash
cd $(brew --prefix)/Library/Homebrew && \
rdoc formula.rb requirement.rb utils.rb &&\
open doc/index.html
```
Closes Homebrew/homebrew#32470 .
2014-09-24 15:08:10 -07:00
Jack Nagel
6ad82e65da
Don't to_s the cmd parameter in Homebrew.system
2014-09-20 13:53:09 -05:00
Jack Nagel
058f557f6a
Stop invoking the editor through an interactive shell
...
This was added in d2ecfb9 / Homebrew/homebrew#12784 to fix a bug repotted in Homebrew/homebrew#12779 , but
at that time we were invoking the editor via `system` rather than
`exec`.
Now we are using exec, and running it through an interactive shell seems
to cause other problems, for example, emacs does not suspend/resume
properly.
Fixes Homebrew/homebrew#32328 .
2014-09-20 11:42:19 -05:00
Jack Nagel
56dd575f96
Pass command and arg list into ErrorDuringExecution constructor
2014-09-18 20:32:50 -05:00
Jack Nagel
e5ea0bcd65
Hack around Zlib constant conflict
2014-09-04 01:28:46 -05:00
Federico Bond
22a98624d2
utils: use the $stderr global variable.
...
For easier capturing.
Closes Homebrew/homebrew#31303 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-08-04 13:17:10 +01:00
Jack Nagel
f34fcd7781
Simplify onoe
2014-07-20 19:47:31 -05:00
Jack Nagel
86b3090d4d
Passing an empty array to puts prints nothing
2014-07-19 23:59:44 -05:00
Jack Nagel
7d28a6c54b
exec_editor with no arguments should not silently succeed
2014-07-18 12:36:26 -05:00
Jack Nagel
0deedabbaf
nostdout doesn't need to capture output
2014-07-06 15:03:42 -05:00
Jack Nagel
6e60b1d8c3
Let File.expand_path also do the join
2014-07-06 13:36:58 -05:00
Jack Nagel
7bd4f76b8c
Check File.file? first to avoid second stat()
2014-07-06 13:35:44 -05:00
Jack Nagel
7e268670ed
Just use each since we're returning from inside the block
2014-07-06 11:16:10 -05:00
Jack Nagel
c7ac8ce454
Expand ~ in PATH entries
2014-07-06 11:15:14 -05:00
Jack Nagel
ad27b21cd1
Add popen wrapper that does not invoke the shell
2014-07-05 13:50:54 -05:00
Jack Nagel
4c05d411f3
Add a method for getting the repo HEAD
2014-06-30 19:18:28 -05:00
Jack Nagel
2daabe9863
Fix uninitialized constant error in GitHub.open
...
The error handling depends on side effects of `require "net/https"`,
so it should be wrapped in an explicit begin block.
cf. Homebrew/homebrew#30407 .
2014-06-24 21:01:04 -05:00
Shaun Jackman
ae3e567daa
Linuxbrew: Use xdg-open
...
Closes Homebrew/homebrew#29817 .
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-06-12 13:11:05 -05:00
Jack Nagel
84cd9cc28f
"exit $?" raises TypeError on Ruby 2.0
2014-06-10 11:33:17 -05:00
James Wald
98e5bd8198
Find vim on the path
...
If vim is on the path, it will be used instead of `/usr/bin/vim`.
Closes Homebrew/homebrew#29885 .
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-06-05 23:56:52 -05:00
Adam Vandenberg
8d44db6b40
pluralize formulae in tap/untap
...
Closes Homebrew/homebrew#28560 .
2014-05-26 18:33:31 -07:00
Jack Nagel
c8c85b4ac4
Always call Process.wait with an argument
2014-03-29 17:47:42 -05:00
Jack Nagel
809c804499
Make sure we wait for the correct child
...
Fixes Homebrew/homebrew#27962 .
2014-03-29 02:24:01 -05:00
Adam Vandenberg
6a13c9e434
which is supposed to return a pathname
2014-03-16 16:05:15 -07:00
Adam Vandenberg
844e94526e
return found path directly in which
2014-03-16 11:52:11 -07:00
kynnjo
5f8e78150e
utils.rb:which: bug fix
...
Closes Homebrew/homebrew#27524 .
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2014-03-16 11:49:35 -07:00
Mike McQuaid
c789f907eb
utils: return empty issues array when no API.
2014-03-13 10:05:20 +00:00
April Arcus
3ddbcd9670
utils: replace bright green with ANSI bold+green.
...
There are two ways of outputting bright ANSI colors to the terminal - the ANSI codes 30-37 plus a bold code (most terminals render bold text with brighter colors, by convention), or the widely supported aixterm codes 90-97.
Although the aixterm codes are more precise (disambiguating bold font from bright color), the ANSI bold+green enables compatibility with the popular [Solarized](https://github.com/altercation/solarized ) color theme, which reassigns the "bright green" codepoint to a shade of gray.
Closes Homebrew/homebrew#27125 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-03-03 12:34:31 +00:00
Adam Vandenberg
88565ac3d4
move scons helper to fileutils
2014-02-28 07:20:52 -08:00
Adam Vandenberg
9055c1e361
add scons helper
2014-02-25 20:29:08 -08:00
Jack Nagel
8d4d56c8db
Use standard curl progress output in verbose mode
...
Closes Homebrew/homebrew#26818 .
2014-02-18 16:03:52 -05:00
Jack Nagel
ea7415237c
Add helpful error message for authentication failures
2014-02-16 23:19:09 -05:00
Jack Nagel
3cbb49930c
Move error text and helper into error class
2014-02-16 23:19:09 -05:00
Jack Nagel
24cbb4fd2e
Add a more useful message when ratelimit is exceeded
2014-02-16 23:11:17 -05:00
Jack Nagel
f7cda3cdb6
Make GitHub::Error a RuntimeError to suppress backtrace
2014-02-16 22:24:33 -05:00
Jack Nagel
6fd0125ad9
Handle GitHub API authentication failures
2014-02-16 22:24:33 -05:00
Jack Nagel
1d5ab3195c
Extract error handling from GitHub.open
2014-02-16 22:24:33 -05:00
Jack Nagel
a7b515e503
Use a more accurate method name and drop unhelpful block
2014-02-13 23:22:43 -05:00
Jack Nagel
fed468c780
Always print top-level issue URL
2014-02-13 23:22:43 -05:00
Jack Nagel
6dec9f6058
Delete comment that isn't relevant to this code anymore
2014-02-13 17:42:37 -05:00