@@ -294,36 +294,41 @@ installed binaries, and so on.
294
294
295
295
::
296
296
297
+ $ whoami
298
+ alice
299
+
297
300
$ cabal path
298
- cache-home: /home/haskell/.cache/cabal/
299
- remote-repo-cache: /home/haskell/.cache/cabal/packages
300
- logs-dir: /home/haskell/.cache/cabal/logs
301
- store-dir: /home/haskell/.local/state/cabal/store
302
- config-file: /home/haskell/.config/cabal/config
303
- installdir: /home/haskell/.local/bin
304
- ...
301
+ compiler-flavour: ghc
302
+ compiler-id: ghc-9.8.2
303
+ compiler-path: /home/alice/.ghcup/bin/ghc
304
+ cache-home: /home/alice/.cabal
305
+ remote-repo-cache: /home/alice/.cabal/packages
306
+ logs-dir: /home/alice/.cabal/logs
307
+ store-dir: /home/alice/.cabal/store
308
+ config-file: /home/alice/.cabal/config
309
+ installdir: /home/alice/.cabal/bin
305
310
306
311
Or using the json output:
307
312
308
313
::
309
314
310
- $ cabal path --output-format=json
315
+ $ cabal path --output-format=json | jq
311
316
312
317
.. code-block :: json
313
318
314
319
{
315
- "cabal-version" : " 3.13.0.0" ,
316
- "compiler" : {
317
- "flavour" : " ghc" ,
318
- "id" : " ghc-9.6.4 " ,
319
- "path" : " /home/user /.ghcup/bin/ghc"
320
- },
321
- "cache-home" : " /home/user /.cabal" ,
322
- "remote-repo-cache" : " /home/user /.cabal/packages" ,
323
- "logs-dir" : " /home/user /.cabal/logs" ,
324
- "store-dir" : " /home/user /.cabal/store" ,
325
- "config-file" : " /home/user /.cabal/config" ,
326
- "installdir" : " /home/user /.cabal/bin"
320
+ "cabal-version" : " 3.13.0.0" ,
321
+ "compiler" : {
322
+ "flavour" : " ghc" ,
323
+ "id" : " ghc-9.8.2 " ,
324
+ "path" : " /home/alice /.ghcup/bin/ghc"
325
+ },
326
+ "cache-home" : " /home/alice /.cabal" ,
327
+ "remote-repo-cache" : " /home/alice /.cabal/packages" ,
328
+ "logs-dir" : " /home/alice /.cabal/logs" ,
329
+ "store-dir" : " /home/alice /.cabal/store" ,
330
+ "config-file" : " /home/alice /.cabal/config" ,
331
+ "installdir" : " /home/alice /.cabal/bin"
327
332
}
328
333
329
334
If ``cabal path `` is passed a single option naming a path, then that
@@ -332,7 +337,7 @@ path will be printed *without* any label:
332
337
::
333
338
334
339
$ cabal path --installdir
335
- /home/haskell/.local /bin
340
+ /home/alice/.cabal /bin
336
341
337
342
While this interface is intended to be used for scripting, it is an experimental command.
338
343
Scripting example:
0 commit comments