Ejemplo n.º 1
0
        public void Atom_ManualTest()
        {
            var path = ApplicationPaths.AtomPath();

            if (Platform.OperatingSystem == OS.Windows)
            {
                Assert.AreEqual(@"C:\Users\knatten\AppData\Local\atom\app-1.19.4", path.Value.NativePath);
            }
            else
            {
                Assert.AreEqual(@"TODO", path.Value.NativePath);
            }
        }
Ejemplo n.º 2
0
 static AbsoluteDirectoryPath GetApmPath()
 {
     if (Platform.OperatingSystem == OS.Windows)
     {
         var atomPath = ApplicationPaths.AtomPath();
         if (!atomPath.HasValue)
         {
             //It's not possible to detect the Atom path on Windows 7, so show a message in that case
             var os       = Environment.OSVersion;
             var win7Info = (os.Platform == PlatformID.Win32NT && os.Version.Major == 6 && os.Version.Minor == 0)
                                         ? " Note that we are unable to detect the Atom installation path on Windows 7."
                                         : "";
             throw new Exception("Failed to find Atom path. Is Atom installed?" + win7Info);
         }
         return(atomPath.Value / ".." / "bin" / "apm.cmd");
     }
     else
     {
         return(AbsoluteDirectoryPath.Parse("apm"));
     }
 }