@@ -285,68 +285,6 @@ cabal preferences. It is very useful when you are e.g. first configuring
285
285
Note how ``--augment `` syntax follows ``cabal user-config diff ``
286
286
output.
287
287
288
- cabal path
289
- ^^^^^^^^^^
290
-
291
- ``cabal path `` allows to query for paths used by ``cabal ``.
292
- For example, it allows to query for the directories of the cache, store,
293
- installed binaries, and so on.
294
-
295
- ::
296
-
297
- $ whoami
298
- alice
299
-
300
- $ cabal path
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
310
-
311
- Or using the json output:
312
-
313
- ::
314
-
315
- $ cabal path --output-format=json | jq
316
-
317
- .. code-block :: json
318
-
319
- {
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"
332
- }
333
-
334
- If ``cabal path `` is passed a single option naming a path, then that
335
- path will be printed *without * any label:
336
-
337
- ::
338
-
339
- $ cabal path --installdir
340
- /home/alice/.cabal/bin
341
-
342
- While this interface is intended to be used for scripting, it is an experimental command.
343
- Scripting example:
344
-
345
- ::
346
-
347
- $ ls $(cabal path --installdir)
348
- ...
349
-
350
288
.. _command-group-database :
351
289
352
290
Package database commands
@@ -734,6 +672,68 @@ Examples:
734
672
be used without arguments, in that case major version bumps are ignored for
735
673
all packages.
736
674
675
+ cabal path
676
+ ^^^^^^^^^^
677
+
678
+ ``cabal path `` allows to query for paths used by ``cabal ``.
679
+ For example, it allows to query for the directories of the cache, store,
680
+ installed binaries, and so on.
681
+
682
+ ::
683
+
684
+ $ whoami
685
+ alice
686
+
687
+ $ cabal path
688
+ compiler-flavour: ghc
689
+ compiler-id: ghc-9.8.2
690
+ compiler-path: /home/alice/.ghcup/bin/ghc
691
+ cache-home: /home/alice/.cabal
692
+ remote-repo-cache: /home/alice/.cabal/packages
693
+ logs-dir: /home/alice/.cabal/logs
694
+ store-dir: /home/alice/.cabal/store
695
+ config-file: /home/alice/.cabal/config
696
+ installdir: /home/alice/.cabal/bin
697
+
698
+ Or using the json output:
699
+
700
+ ::
701
+
702
+ $ cabal path --output-format=json | jq
703
+
704
+ .. code-block :: json
705
+
706
+ {
707
+ "cabal-version" : " 3.13.0.0" ,
708
+ "compiler" : {
709
+ "flavour" : " ghc" ,
710
+ "id" : " ghc-9.8.2" ,
711
+ "path" : " /home/alice/.ghcup/bin/ghc"
712
+ },
713
+ "cache-home" : " /home/alice/.cabal" ,
714
+ "remote-repo-cache" : " /home/alice/.cabal/packages" ,
715
+ "logs-dir" : " /home/alice/.cabal/logs" ,
716
+ "store-dir" : " /home/alice/.cabal/store" ,
717
+ "config-file" : " /home/alice/.cabal/config" ,
718
+ "installdir" : " /home/alice/.cabal/bin"
719
+ }
720
+
721
+ If ``cabal path `` is passed a single option naming a path, then that
722
+ path will be printed *without * any label:
723
+
724
+ ::
725
+
726
+ $ cabal path --installdir
727
+ /home/alice/.cabal/bin
728
+
729
+ While this interface is intended to be used for scripting, it is an experimental command.
730
+ Scripting example:
731
+
732
+ ::
733
+
734
+ $ ls $(cabal path --installdir)
735
+ ...
736
+
737
737
.. _command-group-build :
738
738
739
739
Project building and installing
0 commit comments