[GHC] #10785: ghc-pkg appends colon to db path when piped/redirected
#10785: ghc-pkg appends colon to db path when piped/redirected -------------------------------------+------------------------------------- Reporter: jgertm | Owner: jgertm Type: bug | Status: new Priority: normal | Milestone: Component: ghc-pkg | Version: 7.10.2 Keywords: colon pipe | Operating System: Unknown/Multiple redirect ghc-pkg list | Architecture: | Type of failure: Other Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- Quite simple. Compare the first line of output from {{{#!sh ghc-pkg list ghc-pkg list | head }}} In the second command's output, a colon gets appended at the end of the first line, compared to the first command. This is generally undesired behaviour, since the intent of redirection is to further process the output of the original command. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10785> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10785: ghc-pkg appends colon to db path when piped/redirected -------------------------------------+------------------------------------- Reporter: jgertm | Owner: jgertm Type: bug | Status: new Priority: normal | Milestone: Component: ghc-pkg | Version: 7.10.2 Resolution: | Keywords: colon pipe | redirect ghc-pkg list newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * keywords: colon pipe redirect ghc-pkg list => colon pipe redirect ghc- pkg list newcomer Comment: That should be an easy fix for a newcomer. The function to change is `listPackages` in `utils/ghc-pkg/Main.hs`. Also test what happens on a broken package, and notice hidden packages are currently printed differently as well: {{{ $ ghc-pkg list | grep ghc-7.10.2 /opt/ghc/7.10.2/lib/ghc-7.10.2/package.conf.d: (ghc-7.10.2) }}} As a workaround, use: `ghc-pkg list --simple-output`. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10785#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10785: ghc-pkg appends colon to db path when piped/redirected -------------------------------------+------------------------------------- Reporter: jgertm | Owner: jgertm Type: bug | Status: patch Priority: normal | Milestone: Component: ghc-pkg | Version: 7.10.2 Resolution: | Keywords: colon pipe | redirect ghc-pkg list newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D1164 -------------------------------------+------------------------------------- Changes (by mpickering): * status: new => patch * differential: => Phab:D1164 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10785#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10785: ghc-pkg appends colon to db path when piped/redirected -------------------------------------+------------------------------------- Reporter: jgertm | Owner: jgertm Type: bug | Status: patch Priority: normal | Milestone: Component: ghc-pkg | Version: 7.10.2 Resolution: | Keywords: colon pipe | redirect ghc-pkg list newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1164 -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"c205aebda7005744a5bbe44c11f37e98242145fa/ghc" c205aeb/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="c205aebda7005744a5bbe44c11f37e98242145fa" Removed colon append operation (fixes #10785) Reviewers: jgertm, austin, thomie Reviewed By: thomie Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1164 GHC Trac Issues: #10785 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10785#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10785: ghc-pkg appends colon to db path when piped/redirected -------------------------------------+------------------------------------- Reporter: jgertm | Owner: jgertm Type: bug | Status: closed Priority: normal | Milestone: Component: ghc-pkg | Version: 7.10.2 Resolution: fixed | Keywords: colon pipe | redirect ghc-pkg list newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1164 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10785#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC