internal string GetSpatialPath()
        {
            string path;

            // The command line overrides everything.
            if (!CommandLineUtil.TryGetCommandLineValue(GetCommandLine(), SpatialPathArgument, out path))
            {
                // Then try the user-specific preferences
                path = GetUserString(SpatialRunner.CommandLocationKey, string.Empty);
            }

            // If nothing has been configured, assume it's on the system PATH, and use a sensible default of "spatial"
            if (string.IsNullOrEmpty(path))
            {
                path = DiscoverSpatialLocation(null);
            }

            return(path);
        }