summaryrefslogtreecommitdiff
path: root/dotbot/context.py
diff options
context:
space:
mode:
authorAnish Athalye <me@anishathalye.com>2020-01-03 16:46:19 -0500
committerAnish Athalye <me@anishathalye.com>2020-01-03 16:46:19 -0500
commitec8498ffb88d43c7d0648033d3d758ebb96a9378 (patch)
treed0f4443ea7f55931a9df52e6a36c51cadd340fba /dotbot/context.py
parent3fcc13d803f4f0190d997f71f3af693ecef3e4c5 (diff)
parent320d5d0123b045fe922cf576d8d65e2db0517910 (diff)
Merge branch 'ypid/add/link_real_path_option'
Diffstat (limited to 'dotbot/context.py')
-rw-r--r--dotbot/context.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/dotbot/context.py b/dotbot/context.py
index b2dbd6c..8c42d47 100644
--- a/dotbot/context.py
+++ b/dotbot/context.py
@@ -1,4 +1,5 @@
import copy
+import os
class Context(object):
'''
@@ -13,8 +14,11 @@ class Context(object):
def set_base_directory(self, base_directory):
self._base_directory = base_directory
- def base_directory(self):
- return self._base_directory
+ def base_directory(self, canonical_path=True):
+ base_directory = self._base_directory
+ if canonical_path:
+ base_directory = os.path.realpath(base_directory)
+ return base_directory
def set_defaults(self, defaults):
self._defaults = defaults