Skip to content

Commit

Permalink
Merge pull request #92 from microsoft/FixIssue#75
Browse files Browse the repository at this point in the history
Resolves issue #75 for path issues when run outside of app
  • Loading branch information
guyacosta committed Jan 21, 2020
2 parents 62a8c54 + 39c72f9 commit f4dac6f
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion AppInspector/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion AppInspector/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
<value>unsupported</value>
</data>
<data name="BROWSER_ENVIRONMENT_VAR" xml:space="preserve">
<value>Unable to launch output.html. Set the BROWSER environment variable to your desired browser or open file manually.</value>
<value>Unable to launch output.html automatically. Set the BROWSER environment variable to your desired browser or launch your browser and navigate to the file to view the report file manually.</value>
</data>
<data name="BROWSER_START_FAIL" xml:space="preserve">
<value>Unable to launch output.html in default browser. Open manually to view report.</value>
Expand Down
2 changes: 1 addition & 1 deletion AppInspector/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static private string GetBaseAppPath()
if (!String.IsNullOrEmpty(_basePath))
return _basePath;

_basePath = Path.GetFullPath(AppDomain.CurrentDomain.BaseDirectory);
_basePath = Path.GetFullPath(System.AppContext.BaseDirectory);
return _basePath;
}

Expand Down
2 changes: 1 addition & 1 deletion AppInspector/Writers/LiquidWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class LiquidWriter : Writer
/// <param name="app"></param>
public override void WriteApp(AppProfile app)
{
var htmlTemplateText = File.ReadAllText("html/index.html");
var htmlTemplateText = File.ReadAllText(Path.Combine(Utils.GetPath(Utils.AppPath.basePath), "html/index.html"));
Assembly test = Assembly.GetEntryAssembly();
Template.FileSystem = new EmbeddedFileSystem(Assembly.GetEntryAssembly(), "ApplicationInspector.html.partials");

Expand Down
2 changes: 1 addition & 1 deletion AppInspector/rules/default/components/load_dll.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"name": "Component: Windows DLL",
"id": "AI005500",
"description": "Component: Windows DLL",
"applies_to": [ "cpp" ],
"applies_to": [ "c", "cpp" ],
"tags": [
"Component.Executable.Microsoft.DLL"
],
Expand Down
4 changes: 2 additions & 2 deletions AppInspector/rules/default/frameworks/c.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "Development Framework: Standard C Library",
"recommendation": "",
"applies_to": [ "c" ],
"tags": [ "Framework.Development.StandardCLibrary" ],
"tags": [ "Framework.Development.Library.StandardC" ],
"severity": "moderate",
"patterns": [
{
Expand All @@ -22,7 +22,7 @@
"description": "Development Framework: Boost",
"recommendation": "",
"applies_to": [ "c" ],
"tags": [ "Framework.Development.StandardCLibrary" ],
"tags": [ "Framework.Development.Library.Boost" ],
"severity": "moderate",
"patterns": [
{
Expand Down

0 comments on commit f4dac6f

Please sign in to comment.